
Recursion in Python Quiz

Quiz
•
Information Technology (IT)
•
9th Grade
•
Easy
Fadi Fadi
Used 1+ times
FREE Resource
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is recursion in Python?
A way to create loops using for
A function that returns a list
A function that calls itself
A function that runs forever
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main danger of recursion if not written properly?
It prints the wrong result
It runs only once
It causes an infinite loop
It turns into a list
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which part of a recursive function stops it from calling itself forever?
Return statement
Loop
Base case
Recursive call
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this function return? def factorial(n): if n == 1: return 1 else: return n * factorial(n - 1) print(factorial(3))
3
6
9
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the base case in this function? def countdown(n): if n == 0: print("Blast off!") else: print(n) countdown(n - 1)
print(n)
n == 0
countdown(n - 1)
"Blast off!"
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed when this code runs? def test(x): if x == 0: return print(x) test(x - 1) test(3)
3 2 1 0
0 1 2 3
3 2 1
Nothing
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these problems is most suitable for recursion?
Printing numbers from 1 to 10
Finding maximum in a list
Searching a file in nested folders
Adding two numbers
Create a free account and access millions of resources
Similar Resources on Wayground
11 questions
Python (basics)

Quiz
•
1st Grade - University
15 questions
Python Battle Royale: Who Will Survive in the End?❤️🤔

Quiz
•
9th - 12th Grade
11 questions
Деревья

Quiz
•
9th - 12th Grade
10 questions
Posttest Aplikasi Pengolah Kata

Quiz
•
9th - 12th Grade
10 questions
“Elektron pochtada ishlashni boshlash” (5-sinf))

Quiz
•
5th Grade - University
16 questions
9 Weeks Test

Quiz
•
9th - 12th Grade
18 questions
Тест по функциям Python (functions 3)

Quiz
•
9th - 12th Grade
19 questions
Тест по Циклам Python (Cycles2)

Quiz
•
9th Grade - University
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade
Discover more resources for Information Technology (IT)
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
20 questions
Lab Safety and Lab Equipment

Quiz
•
9th - 12th Grade
20 questions
Grammar Review

Quiz
•
6th - 9th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
24 questions
Scientific method and variables review

Quiz
•
9th Grade
7 questions
EAHS PBIS Lesson- Bathroom

Lesson
•
9th - 12th Grade
57 questions
How well do YOU know Neuwirth?

Quiz
•
9th - 12th Grade
6 questions
Secondary Safety Quiz

Lesson
•
9th - 12th Grade