PY-05-P1: Functions Flashcards

1
Q

call the class by its name with a value corresponding to:

A

__intit__

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

Use ____ to access object attributes

A

< object name > . < attritbute >

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

is a blueprint for an object

A

class

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

Blocks of code with reusuable logic. define functionality in the program.

A

Functions

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

Separate programs into small, readable, and manageable sections

A

Functions

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

A function must be defined first with ___

A

def

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

The ____ keyword is used to pass the values

A

Return

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

____ defines a function

A

def

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

___ ends the execution and returns the result

A

return

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

___ is not a value and refers to empty data

A

None

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

___ is what defines the visibility of a variable

A

Scope

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

___ scope is the main scope of the program

A

Global Scope

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

____ keyword is used to modify a global variable in the main scope of a program

A

Global keyword

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

It returns a different result depending on the execution state of a file

A

__name__

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

where should imports be on a program

A

at the beginning of a program

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

T or F global variables should not follow imports

A

false