How many lines will this program print?
while True:
print "hi"
Unit 5 Code hs
Quiz
•
Other
•
9th Grade
•
Easy
birdy bird
Used 65+ times
FREE Resource
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How many lines will this program print?
while True:
print "hi"
0
1
an infinite number of lines
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How many lines will this program print?
x = 10
while x > 0:
print x
x = x - 3
3
4
5
6
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following programs prints ten lines?
for i from 0 to 9:
print "hi"
for i from 0 to 9:
print "hi"
for i = 1 to 10:
print "hi"
for i in range(10):
print "hi"
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following best describes the purpose of a for loop?
A for loop is for doing something an indeterminate number of times.
A for loop is doing something an infinite number of times.
A for loop is for doing something a fixed number of times.
A for loop is for doing something three times.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which Python keyword skips back to the beginning of a loop?
break
continue
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
If I am using the following condition in my program:
while True:
Which keyword should I use to make sure I don’t create an infinite loop?
break
continue
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does the following program print?
for i in range(2):
for j in range(2):
print i + j
0112
0
1
1
2
0
1
0
1
0101
17 questions
Lesson 5_The loop in Flowcharts 2021
Quiz
•
9th Grade
25 questions
Looping Unit
Quiz
•
9th Grade
21 questions
Minutiae Details of a fingerprint--WK 1
Quiz
•
9th - 12th Grade
18 questions
Comparing Statistical Data
Quiz
•
9th - 12th Grade
20 questions
Excel 2019 Core Vocab
Quiz
•
9th - 12th Grade
25 questions
Python. Теория.
Quiz
•
9th Grade
27 questions
Python ծրագրավորման լեզու
Quiz
•
9th Grade
22 questions
got7 igot7
Quiz
•
1st Grade - Professio...
15 questions
Multiplication Facts
Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz
Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set
Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025
Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)
Quiz
•
9th - 12th Grade
15 questions
June Review Quiz
Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles
Quiz
•
8th Grade
25 questions
Triangle Inequalities
Quiz
•
10th - 12th Grade
40 questions
Week 4 Student In Class Practice Set
Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025
Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)
Quiz
•
9th - 12th Grade
24 questions
LSO - Virus, Bacteria, Classification - sol review 2025
Quiz
•
9th Grade
65 questions
MegaQuiz v2 2025
Quiz
•
9th - 12th Grade
10 questions
GPA Lesson
Lesson
•
9th - 12th Grade
15 questions
SMART Goals
Quiz
•
8th - 12th Grade
10 questions
Exponential Growth and Decay Word Problems
Quiz
•
9th Grade