For and While Loops in Python

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Lauren Tan
Used 145+ times
FREE Resource
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The program above
prints all the odd numbers between 1 and 20
prints all even numbers between 1 and 20
print all the odd numbers between 1 and 21
prints all the even numbers between 1 and 21
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The equivalent of the above for loop using the while syntax would be
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The above program prints
Numbers 1 to 10 in reverse order
Numbers 1 to 11 in reverse order
Numbers 1 to 10
Numbers 1 to 11
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Look at the following code, what will it generate
1,2,3,4,5,6,7,8,9,10,11,12
0,1,2,3,4,5,6,7,8,9,10,11,12
1,2,3,4,5,6,7,8,9,10,11,12,13
0,1,2,3,4,5,6,7,8,9,10,11,12,13
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
1,2,3,4
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What best describes what is printed by the following code?
Prints the numbers 0 through 6
Prints
h
e
l
l
o
w
Prints the phrase "hello world!" 7 times
Prints "hello w" 7 times
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What best describes what is printed by the following code?
Prints the numbers 0 through 6
Prints
h
e
l
l
o
w
Prints the phrase "hello world!" 7 times
Prints "hello w" 7 times
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
p5.js Week1 PREtest

Quiz
•
7th - 12th Grade
17 questions
Binary Quiz Game

Quiz
•
9th - 12th Grade
20 questions
Python while loops

Quiz
•
12th Grade
20 questions
Python list, if

Quiz
•
6th - 12th Grade
15 questions
Binary Addition

Quiz
•
9th Grade - University
15 questions
Year 10 - Binary and Hexadecimal Review

Quiz
•
10th Grade
15 questions
Hangman Game - Programming Questions

Quiz
•
7th - 11th Grade
15 questions
Data Types and Operations

Quiz
•
10th 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
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
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