
Understanding Python Subroutines

Quiz
•
Computers
•
9th Grade
•
Medium
K McVeagh
Used 2+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a subroutine in Python?
A type of variable
A block of code that performs a specific task
A type of loop
A syntax error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to define a subroutine in Python?
define
subroutine
def
function
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of a return statement in a subroutine?
To stop the execution of the program
To return a value to the caller
To print a message to the console
To define a new variable
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you call a subroutine named `calculate_area` in Python?
call calculate_area()
calculate_area
calculate_area()
execute calculate_area()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the scope of a variable defined inside a subroutine?
Global
Local
Universal
Static
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid subroutine definition in Python?
def myFunction:
def myFunction()
def myFunction():
function myFunction()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following subroutine if called with `add_numbers(2, 3)`? ```python def add_numbers(a, b): return a + b ```
5
23
6
0
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Python 9 клас

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

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

Quiz
•
9th Grade
13 questions
Hello World - Quiz

Quiz
•
9th - 12th Grade
14 questions
Python Basics - Year 8

Quiz
•
7th - 9th Grade
10 questions
Python: Functions and Parameters

Quiz
•
9th - 12th Grade
18 questions
Foundations of Programming

Quiz
•
9th - 10th Grade
20 questions
Python turtle year 8 assessment

Quiz
•
7th - 9th Grade
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