
Python Looping Unit Quiz
Quiz
•
9th - 12th Grade
•
Practice Problem
•
Medium
Tracy Hebert
Used 792+ 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
Create a free account and access millions of resources
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
10 questions
CONDITIONAL SENTENCES ALL TYPES
Quiz
•
10th - 12th Grade
20 questions
Ôn tập Tin 11 trong thời gian nghỉ phòng chống dịch COVID-19
Quiz
•
11th Grade
20 questions
MP 1 Chapter 1
Quiz
•
1st Grade - University
12 questions
En el hotel
Quiz
•
KG - 12th Grade
15 questions
Początki chrześcijaństwa
Quiz
•
1st - 12th Grade
20 questions
English 9-Review
Quiz
•
9th Grade
10 questions
แบบทดสอบ need/don’t need
Quiz
•
6th - 9th Grade
10 questions
Wawasan Islami
Quiz
•
11th - 12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
10 questions
Exploring Christmas Traditions Through Cartoons
Interactive video
•
6th - 10th Grade
55 questions
CHS Holiday Trivia
Quiz
•
12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
