PY-05-P1: Functions Flashcards Preview

Python > PY-05-P1: Functions > Flashcards

Flashcards in PY-05-P1: Functions Deck (16)
Loading flashcards...
1
Q

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

A

__intit__

2
Q

Use ____ to access object attributes

A

< object name > . < attritbute >

3
Q

is a blueprint for an object

A

class

4
Q

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

A

Functions

5
Q

Separate programs into small, readable, and manageable sections

A

Functions

6
Q

A function must be defined first with ___

A

def

7
Q

The ____ keyword is used to pass the values

A

Return

8
Q

____ defines a function

A

def

9
Q

___ ends the execution and returns the result

A

return

10
Q

___ is not a value and refers to empty data

A

None

11
Q

___ is what defines the visibility of a variable

A

Scope

12
Q

___ scope is the main scope of the program

A

Global Scope

13
Q

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

A

Global keyword

14
Q

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

A

__name__

15
Q

where should imports be on a program

A

at the beginning of a program

16
Q

T or F global variables should not follow imports

A

false