
Understanding Python Functions and Procedures
Quiz
•
Computers
•
9th Grade
•
Practice Problem
•
Medium
Samuel Markham
Used 3+ times
FREE Resource
Enhance your content in a minute
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to define a function in Python?
`function myFunction():`
`def myFunction():`
`define myFunction():`
`func myFunction():`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid function parameter in Python?
`def myFunction(x, y):`
`def myFunction(x y):`
`def myFunction(x; y):`
`def myFunction(x: y):`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following function if called as `add(2, 3)`? ```python def add(a, b): return a + b ```
`5`
`23`
`None`
`Error`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```python def multiply(x, y): result = x * y return result print(multiply(4, 5)) ```
`20`
`9`
`45`
`None`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to return a value from a function in Python?
`return`
`yield`
`output`
`give`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```python def greet(name): print("Hello, " + name) greet("Alice") ```
`Hello, Alice`
`Hello,`
`Alice`
`Error`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default return value of a function that does not explicitly return a value?
`0`
`None`
`False`
`Error`
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
12 questions
Wee Word Intro
Quiz
•
7th - 12th Grade
10 questions
NHTW Programming
Quiz
•
9th Grade
10 questions
Bài tập Tin học lớp 4
Quiz
•
1st - 12th Grade
13 questions
Five Nights At Freddy's: Security Breach Quiz
Quiz
•
KG - Professional Dev...
14 questions
Bài 29. Nhận biết lỗi chương trình
Quiz
•
9th - 12th Grade
11 questions
CAPÍTULO 1 NETWORKING ESSENTIALS
Quiz
•
1st - 12th Grade
10 questions
Innovations of Technology
Quiz
•
7th - 10th Grade
10 questions
Activity 1: How well do you know Java?
Quiz
•
9th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
