Python Functions

Quiz
•
Computers
•
9th Grade
•
Easy
Wayground Content
Used 24+ times
FREE Resource
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements will successfully send the value "EEK" back from a function to the calling code?
EEK
return EEK
back EEK
#print(EEK)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the line of code:
Label('Go Team', 200, 100)
What is the Label?
argument
parameter
function name
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What character should be placed at the end of the function "def" line, after the parentheses?
Hashtag (#)
Colon(:)
Exclamation (!)
Dash (-)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct code to define a function?
def area ( ):
area ( )
def area:
def area ( )
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following rules is true about locally scoped variables?
Local variables can hold less data than global variables
Local variables can be seen and accessed from any part of the program code
Local variables will keep their same value over repeated calls to the function
Local variables can only be seen and used from inside a function
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword marks a spot in a function where the program flow will go back to the calling code?
break
return
continue
jump
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many return statements can you place inside one function body?
As many as needed; each marks a spot where program flow returns to the calling code
You can have one return statement per parameter that is defined by the function "def"
You are limited by the number of body statements, divided by 2
Exactly one
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Python turtle year 8 assessment

Quiz
•
7th - 9th Grade
16 questions
Python Looping with Integers

Quiz
•
9th - 12th Grade
14 questions
Python Control Structures Vocab quiz

Quiz
•
9th - 12th Grade
16 questions
Python Functions

Quiz
•
9th - 12th Grade
20 questions
PYTHON

Quiz
•
9th - 12th Grade
15 questions
Computer Programming Challenge

Quiz
•
9th Grade
20 questions
CODEHS KAREL

Quiz
•
7th - 9th Grade
20 questions
MS Excel Basics

Quiz
•
5th Grade - Professio...
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade