
Python Functions Quiz

Quiz
•
Computers
•
12th Grade
•
Hard
Vanissa Obina
FREE Resource
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a function in Python?
A data structure
A block of code that runs when called
A built-in library
A type of variable
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What do you call the data passed into a function?
Arguments
Variables
Expressions
Constants
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you define a function in Python?
function myFunction()
def myFunction():
create myFunction()
define myFunction:
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What symbol is used to denote arbitrary arguments in a function?
#
*
&
%
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the return statement in a function?
To return a value from the function
To define a function
To end the function
To call another function
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the pass statement do in a function?
Calls another function
Indicates an empty function definition
Terminates the function
Returns a value
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a lambda function?
A type of loop
A small anonymous function
A built-in data type
A method for recursion
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
p5.js Week1 PREtest

Quiz
•
7th - 12th Grade
10 questions
CHAPTER1-FUNCTION

Quiz
•
12th Grade
10 questions
G7 Excel Quiz 1

Quiz
•
7th Grade - University
17 questions
AP CSP CPT Practice Quiz

Quiz
•
8th - 12th Grade
10 questions
Excel Intro

Quiz
•
7th - 12th Grade
10 questions
Polymorphism and Method Overloading Quiz

Quiz
•
12th Grade
10 questions
Exploring Python: Input and Output Essentials

Quiz
•
9th Grade - University
12 questions
Python Definitions

Quiz
•
10th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade