0Pricing
Coding for Kids · Lesson

More Options with elif

Choose between several paths.

More Options with elif is a free Coding for Kids lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Coding for Kids learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

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! 🟡")

if, elif, else Team 🤝

Together they make a team! if checks first, elif checks next, and else is the backup.

light = "green"
if light == "red":
    print("Stop!")
elif light == "yellow":
    print("Slow!")
else:
    print("Go! 🟢")

Only One Wins 🥇

Python checks top to bottom and runs the first one that is True. Then it stops! Only one wins.

n = 5
if n > 100:
    print("Huge!")
elif n > 3:
    print("Medium! 🔢")
else:
    print("Tiny!")

Many elifs Allowed 🪜

You can have LOTS of elif steps, like a staircase of choices!

pet = "fish"
if pet == "dog":
    print("Woof! 🐶")
elif pet == "cat":
    print("Meow! 🐱")
elif pet == "fish":
    print("Blub! 🐠")

Grading a Score 📝

Let us give a grade based on a score using elif!

score = 75
if score > 90:
    print("A+ Amazing! 🌟")
elif score > 60:
    print("Great job! 😊")
else:
    print("Keep trying! 💪")

Pick a Size 👕

Small, medium, or large? elif helps us pick!

size = "medium"
if size == "small":
    print("Tiny! 🐭")
elif size == "medium":
    print("Just right! 🐰")
else:
    print("Big! 🐘")

Weather Choices 🌦️

Sunny, rainy, or snowy? Let us choose the right gear!

weather = "rainy"
if weather == "sunny":
    print("Sunglasses! 😎")
elif weather == "rainy":
    print("Umbrella! ☔")
else:
    print("Coat! 🧥")

With input() 🗣️

Ask the user, then use elif to reply differently!

mood = input("How are you? (happy/sad/ok) ")
if mood == "happy":
    print("Yay! 😄")
elif mood == "sad":
    print("Sending a hug! 🤗")
else:
    print("Cool! 😊")

Number Buddies 🔢

Check if a number is big, medium, or small.

n = 50
if n > 80:
    print("Big! 🐘")
elif n > 30:
    print("Medium! 🐰")
else:
    print("Small! 🐜")

You Mastered Choices! 🎉

Wonderful! Try making your own three-way choice with a favorite fruit!

fruit = "apple"
if fruit == "banana":
    print("Yellow! 🍌")
elif fruit == "apple":
    print("Red! 🍎")
else:
    print("Yummy! 😋")

Quick Check 🧠

Quiz time! 🎯 What does elif mean?

Recap Time! 🌟

You are unstoppable! 🚀 Today you learned:

  • elif means "else if"
  • It checks another option
  • Use if, elif, else as a team
  • Only the first True one runs

You are a choice master! 🏆

Frequently asked questions

Is the “More Options with elif” lesson free?

Yes — the full text of “More Options with elif” is free to read here on the web, and the Coding for Kids course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Coding for Kids course, upgrade to CoddyKit PRO.

What will I learn in “More Options with elif”?

Choose between several paths. You practise Coding for Kids with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Coding for Kids?

No prior experience is required. Coding for Kids on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “More Options with elif” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Coding for Kids lesson?

Yes. Every Coding for Kids lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

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