
Python Functions Quiz

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Michael Rosemond
Used 3+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a function in Python?
A block of reusable code that performs a specific task.
A data type that stores multiple values.
A loop that repeats instructions.
A variable that stores a value.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How to define a function in Python?
function_name:
function_name(parameters):
function_name(parameters)
def function_name(parameters):
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you call a function in Python?
Use the function name followed by brackets.
Use the function name followed by a semicolon.
Use the function name followed by parentheses.
Use the function name followed by a colon.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the return statement do in a function?
Defines a new variable in the function.
Terminates the function's execution.
Prints a message on the console.
Specifies the function's return value.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What's the difference between parameters and arguments in a function?
They are the same.
Parameters are passed when the function is called, arguments are defined in the function definition.
Parameters are defined in the function definition, arguments are passed when the function is called.
Parameters are used in built-in functions, arguments in user-defined functions.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the scope of a variable defined inside a function?
Limited to that function.
Limited to the file it is defined in.
Limited to the class it is defined in.
Global.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a recursive function?
A function that calls another function within its own definition.
A function that uses loops instead of function calls.
A function only used in object-oriented programming languages.
A function that calls itself within its own definition.
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
Python Functions

Quiz
•
9th - 12th Grade
10 questions
Understanding Procedures in Python

Quiz
•
9th Grade - University
15 questions
Technical Quiz R2

Quiz
•
12th Grade
15 questions
Python Fundamentals Quiz

Quiz
•
11th Grade
15 questions
Object Orientation 2

Quiz
•
11th Grade
12 questions
HIGHER Python Subroutines Quiz

Quiz
•
9th Grade
10 questions
Functions In Python

Quiz
•
12th Grade
10 questions
Python Concepts

Quiz
•
9th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

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

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
40 questions
LSHS Student Handbook Review: Pages 7-9

Quiz
•
11th Grade
24 questions
Scientific method and variables review

Quiz
•
9th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
19 questions
Mental Health Vocabulary Pre-test

Quiz
•
9th Grade