Lesson 2 of 3
The countdown
range() can also count backwards: range(3, 0, -1) gives 3, then 2, then 1.
The loop variable (often i or n) takes a new value on every turn — you can print it with print().
for n in range(3, 0, -1):
print(n)🎯 Your mission
Your rocket is ready! Print the countdown 3, 2, 1 with a loop, then print Liftoff! after the loop.
PRO lesson
This advanced chapter is part of CodeAge PRO. Unlock it to keep your adventure going.
Discover PRO →