Bug hunts · Quest 8

Bug hunt: loops that misbehave

Endless loops and off-by-one counts: spot them before they spot you.

Question 1 of 5

What is wrong, or how do you fix it?

n = 1
while n < 5:
    print(n)

See the book Code Quest with Python →