count = 1
while count <= 3:
print(count)
count = count + 1Line-by-line explanation
- The counter starts at 1.
- The loop continues while count is at most 3.
- The current number is displayed.
- The final line increases count so the loop can eventually stop.