
Python Looping Unit Quiz
Quiz
•
9th - 12th Grade
•
Practice Problem
•
Medium
Tracy Hebert
Used 794+ times
FREE Resource
About this resource
This quiz thoroughly assesses Python looping structures and control flow, making it appropriate for grades 9-12 students studying introductory computer science or programming. The questions focus on two primary loop types: for loops with the range() function and while loops with conditional statements. Students must demonstrate understanding of range() parameters including start, stop, and step values, predict loop output by tracing through iterations, analyze loop termination conditions, and understand control flow statements like break. The quiz requires students to read and interpret Python syntax, understand logical operators (and, or) in Boolean expressions, distinguish between inclusive and exclusive ranges, and recognize when infinite loops occur. Students need strong analytical skills to trace through code execution step-by-step and conceptual understanding of when to choose for loops versus while loops based on whether the number of iterations is predetermined or depends on runtime conditions. Created by Tracy Hebert, a teacher in the US who teaches grades 9-12. This comprehensive assessment serves multiple instructional purposes throughout a Python programming unit on loops and iteration. Teachers can use this quiz as a formative assessment to gauge student understanding before moving to more complex programming concepts, assign it as homework to reinforce classroom learning, or implement it as a review activity before summative assessments. The variety of question types - from syntax recognition to code tracing to conceptual understanding - makes it valuable for identifying specific areas where students need additional support. This quiz aligns with computer science standards including CSTA K-12 CS Standards 3A-AP-13 (creating prototypes using control structures) and 3A-AP-15 (justifying the selection of specific algorithms), as well as supporting state standards that emphasize algorithmic thinking and programming fundamentals in high school computer science courses.
See more
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following for loops would print the following numbers?
for i in range(5):
print i
for i in range(1, 5, 1):
print i
for i in range(6):
print i
print i in range(0,5,1):
print i
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following for loops would print the following numbers?
for i in range(3,10,2):
print i
for i in range(3,9,2):
print i
for i in range(9):
print i
for i in range(3, 9)
print i
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the value of num when this loop completes?
2
8
12
20
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following for loops will give the same values for i as the loop below?
for i in range(10):
for i in range(11,0):
for i in range(10, 0, -1):
for i in range(0,10):
for i in range(0,11,1):
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Three of the for loops below will provide identical values for i. Which for loop will provide values that do not match the others?
for i in range(0,5):
for i in range(5):
for i in range(0,5,1):
for i in range(5,0,1):
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does this program print?
It's still a nice day
It's still a nice day
It's still a nice day
It's still a nice day
It's still a nice day
It's still a nice day
It's still a nice day
It's still a nice day
It's still a nice day
It's still a nice day
It's still a nice day
It's still a nice day
It's still a nice day
It's still a nice day
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following while loops would continue to loop as long as num has values in the range 3 to 12, exclusive?
while num >12 and num <3:
# do something with num
while num <12 or num <3:
# do something with num
while num <=12 and num >=3:
# do something with num
while num <12 and num >3:
# do something with num
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
PTS PROGRAMAN DASAR
Quiz
•
10th Grade
15 questions
Will/Might/Won't Basic uses
Quiz
•
6th - 12th Grade
12 questions
Пітон. Списки.
Quiz
•
9th - 10th Grade
16 questions
龍騰版第二冊Lesson 9 The Story behind Eponyms - 119
Quiz
•
10th Grade
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
20 questions
SOFTWARE 7I
Quiz
•
7th Grade - University
20 questions
FIC 1005 - Interpretação textual- 3º período
Quiz
•
10th - 12th Grade
10 questions
Greetings and Farewells
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for
20 questions
El Verbo IR Practice
Quiz
•
9th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
15 questions
Main Idea and Supporting Details.
Quiz
•
4th - 11th Grade
10 questions
Theme
Quiz
•
9th Grade
20 questions
Cell Organelles
Quiz
•
10th Grade
12 questions
Exponential Growth and Decay
Quiz
•
9th Grade
