Keywords Flashcards

1
Q

print

A

print to console

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

print to console

A

print

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

while

A

while loop
sub routine
returns data types from a list until a specified condition/value is met
controlling the flow of the program with a loop sub routine that will continue forever or till a specified value is met.
preferable to use for loop if poss

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

while loop
sub routine
returns data types from a list until a specified condition/value is met
controlling the flow of the program with a loop sub routine that will continue forever or till a specified value is met.
preferable to use for loop if poss

A

while

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

for

A

for loop
retuns data types from a list in order
iterate over items of a collection in order that they appear

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

break

A

interrupt the (loop) cycle, if needed

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

yield

A

is used with generators

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

exec

A

executes Python code dynamically

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

class

A

used to create new user defined objects

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

assert

A

used for debugging purposes

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

pass

A

does nothing

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

del

A

deletes objects

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

raise

A

create a user defined exception

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

finally

A

is always executed in the end. Used to clean up resources.

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

except

A

catches the exception and executes codes

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

try

A

specifies exception handlers

17
Q

global

A

access variables defined outside functions

18
Q

lambda

A

creates a new anonymous function

19
Q

return

A

exits the function and returns a value

20
Q

def

A

used to create a new user defined function

21
Q

from

A

for importing a specific variable, class or a function from a module

22
Q

as

A

if we want to give a module a different alias

23
Q

import

A

import other modules into a Python script

24
Q

or

A

at least one condition must be met.

25
Q

and

A

all conditions in a boolean expression must be met

26
Q

not

A

negates a boolean value

27
Q

is

A

tests for object identity

28
Q

else

A

is optional. The statement after the else keyword is executed,
unless the condition is True

29
Q

elif

A

stands for else if.If the first test evaluates to False,

then it continues with the next one

30
Q

if

A

used to determine, which statements are going to be executed.

31
Q

continue

A

used to interrupt the current cycle, without jumping out of the whole cycle.
New cycle will begin.