
Python Functions Test
Authored by ANDRES FELIPE GOMEZ-CASSERES ESPINOSA
Computers
6th Grade
Used 14+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What is a function in Python?
A block of reusable code that performs a specific task.
A keyword used to define a loop in Python
A variable that stores a value in Python
A type of data structure in Python
2.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
How do you define a function in Python?
By using the 'define' keyword followed by the function name and parentheses
By using the 'function' keyword followed by the function name and parentheses
Using the 'def' keyword followed by the function name and parentheses, then a colon, and finally the function body.
By using the 'func' keyword followed by the function name and parentheses
3.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
How do you call (or activate, execute, or use) a function in Python?
By writing the function name followed by parentheses and any required arguments inside the parentheses
By writing the function name followed by square brackets
By writing the function name followed by curly braces
By writing the function name followed by angle brackets
4.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What are parameters for in a function?
Parameters are used to make the code more efficient.
Parameters are used to pass values OUT of a function.
Parameters are used to pass values INTO a function.
Parameters are used to confuse the programmer.
5.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
Can a function in Python have multiple parameters?
No
Maybe
Yes
Only on weekends
6.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What is the syntax for defining a function with parameters in Python?
def function_name(parameter1, parameter2, ...)
def function_name(parameter1, parameter2)
function_name(parameter1, parameter2):
function_name(parameter1, parameter2)
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Write a simple Python function with parameters that adds the two parameters.
def add_numbers(num1, num2): return num1 / num2
def add_numbers(num1, num2): return num1 + num2
def add_numbers(num1, num2): return num1 - num2
def add_numbers(num1, num2): return num1 * num2
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
10 questions
General Computing
Quiz
•
5th - 12th Grade
10 questions
QBASIC Programming
Quiz
•
5th - 10th Grade
10 questions
KS3 - Fun Computing Quiz 2
Quiz
•
4th - 12th Grade
10 questions
3.8 СЫЗЫҚТЫҚ АЛГОРИТМДЕРДІ ПРОГРАММАЛАУ
Quiz
•
6th Grade
10 questions
L1 - Elements of a Computer
Quiz
•
6th Grade
10 questions
final rev y6 t3 2021-2022
Quiz
•
6th Grade
10 questions
DBMS Quiz 3
Quiz
•
1st - 10th Grade
13 questions
Principles of Programming
Quiz
•
KG - University
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