HanuLab HanuLab
πŸ—ΊοΈ Map β€Ί ⚔️ Apprentice β€Ί 🔀 Logic & Conditions

Lesson 2 β€” elif: When the Fork Has More Than Two Ways

⏱ 25–30 minutes 💻 Write real Python in the browser (runs instantly, nothing to install) πŸ’‘ elif = a third, fourth, fifth path... the program checks top to bottom and stops at the first true one
πŸ’‘ Play away! To save stars, ask a parent to log in
πŸ‘¨β€πŸ‘©β€πŸ‘§ Notes for parents

Level: Apprentice β€” roughly Grade 7 / ages 12–13 Duration: 25–30 minutes Format: Write real Python in the browser (runs instantly, nothing to install) Concept: elif = a third, fourth, fifth path... the program checks top to bottom and stops at the first true one

Learning Objective

Kids use if/elif/else for multiple paths and understand that condition ORDER matters β€” the program checks top to bottom and takes the first true branch.

Do It Together (Parent-Child Co-participation)

Experiment together: swap the if energy >= 80 line with elif energy >= 40 and feed in 90 β€” why is the answer wrong? Have your child explain in their own words (top-to-bottom, stop at first true).