NEW
Font size
WorksheetsPython Chapter 4: Loops
Total questions: 10
Worksheet time: 5mins
A control structure that causes a statement or group of statements to repeat as many times as necessary is known as a(n) _____.
loop
operator
counter
sequence
A _________ loop uses a true/false condition to control the number of repetitions
count-controlled
condition-controlled
situation-controlled
prequalified
A _________ loop uses a true/false condition to control the number of repetitions
count-controlled
condition-controlled
situation-controlled
prequalified
A single execution of the statements in the body of the loop is called a(n) _____.
accumulation
iteration
range
control
A while loop tests its expression:
once, during initialization
before each iteration
after each iteration
inside the loop
How many times will ‘Hello World’ be printed in the following code?
0
1
10
an infinite number of times
An infinite loop repeats until the program is
replicated
debugged
interrupted
recompiled
Assume the variable upper_limit is assigned the value 50. How many times will the following for loop iterate?
49
50
0
51
What will the code display?
10
15
20
320
What sequence of numbers will the following code display?
100
99
...
0
99
98
...
1
100
99
...
1
99
98
...
0
