0Pricing
Coding for Kids · Lesson

The else Backup Plan

Do something else when it is false.

A Backup Plan 🅱️

Hi, smart coder! 🧠 Last time, if ran code when something was True. But what if it is False? We need a backup plan: else! 🦸

The else Word 🔀

else means "otherwise, do this instead". It runs when the if is False.

age = 4
if age > 5:
    print("Big kid!")
else:
    print("Little kid! 🍼")

All lessons in this course

  1. Choosing with if
  2. The else Backup Plan
  3. Comparing Values
  4. More Options with elif
← Back to Coding for Kids