Python Looping Unit Quiz

Python Looping Unit Quiz

9th - 12th Grade

15 Qs

quiz-placeholder

Similar activities

Functions of a Sentence

Functions of a Sentence

6th - 12th Grade

10 Qs

Apology

Apology

12th Grade

10 Qs

Comparons le passé et le présent !

Comparons le passé et le présent !

8th - 9th Grade

14 Qs

kuis informatika perangkat lunak

kuis informatika perangkat lunak

10th - 12th Grade

20 Qs

SOAL CONGRATULATION kelas9

SOAL CONGRATULATION kelas9

9th Grade

17 Qs

Literatura 1-2

Literatura 1-2

12th Grade - University

20 Qs

How well do you know your friend?

How well do you know your friend?

1st - 12th Grade

10 Qs

Kuis Pemahaman Demokrasi

Kuis Pemahaman Demokrasi

9th - 12th Grade

10 Qs

Python Looping Unit Quiz

Python Looping Unit Quiz

Assessment

Quiz

9th - 12th Grade

Practice Problem

Medium

Created by

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

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

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

Media Image

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

Media Image

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

Media Image

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?