Python 3rd Quarter Flashcards
1
Q
segment of code that performs a single task
A
Function
2
Q
functions already made in Python
A
Built-in functions
3
Q
functions made by the user
A
User defined functions
4
Q
variable defined inside a function
A
Local variable
5
Q
variable defined outside a function
A
Global variable
6
Q
creates an anonymous function
A
Lambda
7
Q
stores elements in last-in first-out fashion
A
Stack
8
Q
what the header of a function consists of
A
Function name and parameter list
9
Q
a loop within a loop
A
Nested loop
10
Q
2 main types of functions
A
- Built-in function
- User defined function
11
Q
where arguments to functions always appear in
A
Parentheses
12
Q
returns the absolute value
A
abs( )
13
Q
returns the length of an object
A
len( )
14
Q
returns largest item in an iterable
A
max( )
15
Q
returns smallest item in an iterable
A
min( )