
Functions

Quiz
•
Professional Development
•
Professional Development
•
Hard
Elankayer Sithirasenan
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what key word is used to define a function in Python?
assign
define
func
def
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what keyword is used to return a value from a function?
value
output
def
return
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
how will you call a function with the following definition?
def calculate_gcd(a, b):
gcd(56, 72)
calculate_gcd(56. 72)
calculate(56, 72)
def(56, 72)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what will be the output from the following function?
def my_func(name = "Elan"):
print("My name is " + name + "kayer")
"Elan"
"kayer"
"Elankayer"
"Elan kayer"
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what will be returned from the following function if it is called as my_func(6)?
def my_func(a):
return(5*a)
30
5
6
0
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what is the use of the 'pass' statement within a function?
define a function with a parameter
pass a value to the function
define function with no content
define a pass function
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what do you understand by the term 'recursive function?
a function calling itself
a function without parameters
a function with return value
a function with an infinite loop
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Week 1 Quiz - Python Basics

Quiz
•
Professional Development
10 questions
IOAC - ML Batch Pre-Assessment -4th-Feb

Quiz
•
Professional Development
9 questions
Python training series quiz

Quiz
•
Professional Development
10 questions
Web Development Workshop

Quiz
•
University - Professi...
10 questions
Workshop Day 3

Quiz
•
Professional Development
10 questions
React Basics Quiz

Quiz
•
Professional Development
15 questions
[FAST TRACK] Android Class Quiz week 05 12/05

Quiz
•
Professional Development
5 questions
python MCQ

Quiz
•
Professional Development
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade