0Pricing
Coding for Kids · Lesson

More Options with elif

Choose between several paths.

More Than Two Choices 🎚️

Hi, choice champion! 🏆 Sometimes there are MORE than two options. Like a traffic light: red, yellow, green! 🚦 For this we use elif!

The elif Word 🪜

elif means "else if". It checks another thing if the first if was False.

light = "yellow"
if light == "red":
    print("Stop! 🛑")
elif light == "yellow":
    print("Slow down! 🟡")

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