intro to python Flashcards

1
Q

uses of python

A

web development ( server-side )
software development
mathematics
system scripting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is IDE

A

Integrated Development Environment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

use of IDE

A

allows common activities of writing software such as editing source code, building executable and debugging to be completed in a single application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

examples of IDE

A

onlinegdb

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

common errors in programming

A

syntax error
runtime error
logic error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

syntax error

A

refers to structure of the program and the rules of that structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

runtime error

A

shows when β€˜ run β€˜
called exceptions because it indicates that something exceptional and bad happened

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

logic error

A

run successfully but it will not do the right things
do exactly what you told it to do

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

indentation uses to

A

indicate a block of code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

comments and docstrings

A

purpose of in-code documentation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is variable

A

as containers for storing data values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

data type

x = β€œHello World”

A

str

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

data type

x = 20

A

int

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

data type

x = 20.5

A

float

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

data type

x = 1j

A

complex

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

data type

x = [β€œapple”, β€œbanana”, β€œcherry”]

A

list

17
Q

data type

x = (β€œapple”, β€œbanana”, β€œcherry”)

A

tuple

18
Q

data type

x = range(6)

A

range

19
Q

data type

x = True

A

bool

20
Q

rules for naming variables

A
  • must begin with a letter or underscore
  • can only contain alpha-numeric characters and underscores
  • cannot use keywords