0Pricing
Coding for Kids · Lesson

Counting Down

Loop backwards.

Counting Down 📉

Time for a countdown! 5, 4, 3, 2, 1... blast off! 🚀 We use a NEGATIVE step.

Negative Step ⬇️

A step of -1 makes range count backwards!

for i in range(5, 0, -1):
    print(i)

All lessons in this course

  1. The range Helper
  2. Counting Up
  3. Counting by Steps
  4. Counting Down
← Back to Coding for Kids