Complete Solutions
Which of the following will appear in a valid function definition signature? the def
keyword, the name of the function, a parameter list, a return type preceded by -> ends with a :
which of the following will appear in a valid function definition? the def keyword, the
name of the function, an argument list, a function body, a return type preceded by ->, (a
signature)
T/F: Each argument is an expression True
The signature line tells anyone who wants to use a function what it needs in order to be called
and what you can expect returned back as a result True
Parameters are found in a function definitions. Arguments are found in function calls.
True
,function names are stored in the stack
function definitions are stored in the heap
when a function is called, a frame is added to the stack
when print is called, the result is added to the output
a return address specifies the line of code where a function is called
what is the result of not True False
what is the result of not not True True
what is the result of not True and not True false
what is the result of not True or not False True
, what is the result of not False or not False True
what is the result of True and False or False and not False False
Which operator evaluates first: True and False or False and not False not
Which operator evaluates last: True and False or False and not False or
the standard mode of control flow in our programs is linear, meaning statements are evaluated
one after another after another true
with an if-else statement, control flow can fork in one, or two possible different directions.
True
an if statement always requires a corresponding else False