What is a function call?
Invoking a function
Passing data to a function
Returning a value
Defining a function
Why do we have functions?
To prevent re-writing the same code repeatedly
To write functions separately from the rest of the code
To write functions separately from the rest of the code
All of the above
What is a tuple?
A list that can be modified
A data type that cannot change values
A section of code that gets specified separately
A function that returns multiple values
What are some useful functions for lists?
Len(A), max(A), min(A), sum(A)
A.append(B), A.insert(B, C), A.sort(), A.index(B), A.pop(B), A.remove(B)
Both of the above
None of the above
What is the scope of a variable?
The regions of the program where the variable is valid and can be accessed
The memory location of the variable
The value assigned to the variable
The type of the variable
What is a local variable?
A variable defined throughout the program
A variable that can be accessed from any function
A variable that can be modified by any function
A variable defined in the context of a particular function
What is a global variable?
A variable defined throughout the program
A variable that can be accessed from any function
A variable defined in the context of a particular function
A variable that can be modified by any function
What happens when a function is called?
The function modifies the memory of the main program
The function gets its own separate area of memory
The function shares the same memory as the main program
The function shares the same memory as the main program
What is the purpose of passing parameters to a function?
To modify the values of the parameters in the main program
To allow the function to access global variables
To create new variables in the function's memory
To provide data for the function to work with
{"name":"What is a function call?", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What is a function call?, Why do we have functions?, What is a tuple?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker