
Python Function
Quiz by Pamela Castano
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
Does Python function always returns a value?
What is the output of the code below?
def demo(name, age):
print(name, age)
demo("Jessica",28)
def addition(num): # line 1
print(num + 25) # line 2
fun(5) # line 3
Identify which line of code has an error?
def subtraction(num)” # line 1
print(25 – num ) #line 2
subtraction(5) # line 3
Identify which line of code has an error?
What is the output of the code below?
def subtraction(num):
print(25 – num )
subtraction(5)
Select which is true about Python function.
What is the output of the code below?
def addition(num):
print(num + 25)
addition(5)
What is the output of the following function call?
def demo(name, age=20):
print(name, age)
demo('Emma', 25)
Select which is true for a parameter.
Select which statement is true about Python function.