WorksheetsT-Level DPDD: Functions & Procedures Quiz
Total questions: 10
Worksheet time: 5mins
Which of the following is NOT a type of function in Python?
Built-in functions
User-defined functions
Anonymous functions
Static functions
What keyword is used to define a function in Python?
func
def
function
create
What is the output of the example Python function call?
This is my simple function
This is a simple function
This is my function
This is a function
What is an argument in the context of Python functions?
The name of the function
The value sent to the function when it is called
The keyword used to define the function
The output of the function
Which of the following statements is true about methods and functions in Python?
All functions are methods, but not all methods are functions.
All methods are functions, but not all functions are methods.
Methods and functions are the same.
Methods cannot be called using an instance of a class.
What is the output of the following Python function call? my_simple_function("Saundra")
Saundra best friend
Saundra good friend
Saundra friend
Saundra best buddy
In Python, how do you separate multiple arguments in a function call?
With a semicolon
With a colon
With a comma
With a period
What is the output of the following Python function call? my_function("Touffouo", "Mahnou")
Touffouo Mahnou
Mahnou Touffouo
Touffouo, Mahnou
Mahnou, Touffouo
What will the example code print if temp is 25?
25 turn thermostat up to 20°C
25 turn thermostat down to 20°C
temperature is 20°C
25 turn thermostat off
What will the example code print if temp is 18?
18 turn thermostat up to 20°C
18 turn thermostat down to 20°C
temperature is 20°C
18 turn thermostat off
