Loops · Complete the Code
Shape — improve or specify
L3 Application
Blocks
~2 min
Print 1 to 5
The program should print the numbers 1, 2, 3, 4, 5, each on its own line. Which arguments complete range(...)?
for i in range(______):
print(i)
Why this activity was chosen
- Bloom level: L3 Application: Choose the fragment that completes a partly written program.
- Block Model level: Blocks (step 2 of 4): a logical group of statements read as one unit, such as a loop, a conditional or a function.
- Misconception targeted: shown after you answer, so it does not give the answer away.
Application without a blank page: students apply a concept by deciding what the missing piece must be, which requires reading the surrounding code and the stated requirement. Distractors encode off-by-one, quoting and operator errors that generated code often contains.
AI’s role here: AI may hint at what the blank has to do. It must not name the fragment.