
Python Subroutines Basics Quiz
Quiz
•
Fun
•
Professional Development
•
Practice Problem
•
Medium
Mr Massett
Used 3+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to define a function in Python?
`function`
`define`
`def`
`func`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if a function does not include a `return` statement?
It will cause a syntax error.
It will return `None` by default.
It will return `0`.
It will return an empty string.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following correctly defines a function in Python?
`function greet(): print("Hello")`
`def greet(): print("Hello")`
`define greet(): print("Hello")`
`greet() = def(): print("Hello")`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you call a function named `calculate_area` with two arguments (5, 10)?
`calculate_area[5, 10]`
`calculate_area{5, 10}`
`calculate_area(5, 10)`
`calculate_area -> (5, 10)`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of parameters in a function?
To store global variables.
To pass values into a function.
To create an infinite loop.
To return multiple values.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following function return? ```python def multiply(x, y): return x * y print(multiply(3, 4)) ```
`7`
`12`
`34`
`None`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a function and a procedure in Python?
A function always returns a value, whereas a procedure does not.
A procedure must take arguments, but a function does not.
A function can only have one line of code, but a procedure can have multiple lines.
There is no difference; they are the same.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Sakernas Fun Quiz I
Quiz
•
Professional Development
10 questions
Pre event meetup (Give Answers and Win Swags)
Quiz
•
Professional Development
20 questions
Safety Leadership Workshop
Quiz
•
Professional Development
13 questions
ED SHEERAN - SHAPE OF YOU
Quiz
•
Professional Development
15 questions
Ice Breaking Level | IMPOSIBLE
Quiz
•
Professional Development
11 questions
The Value of Loyalty Quiz
Quiz
•
Professional Development
10 questions
Minecraft Dungeons
Quiz
•
KG - Professional Dev...
15 questions
Q1 - Logos
Quiz
•
Professional Development
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
