HanuLab HanuLab
πŸ—ΊοΈ Map β€Ί ⚔️ Apprentice β€Ί 🔁 Loops & Lists

Lesson 2 β€” while: Loop Until It's Done

⏱ 25–30 minutes 💻 Write real Python in the browser (runs instantly, nothing to install) πŸ’‘ while keeps looping as long as the condition is true — for when you don't know the round count in advance
πŸ’‘ 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: while keeps looping as long as the condition is true β€” for when you don't know the round count in advance

Learning Objective

Kids choose when to use for (known count) vs. while (loop until a condition changes) and write a while that actually ends β€” understanding the danger of infinite loops.

Do It Together (Parent-Child Co-participation)

Find real-life whiles: "people keep queueing AS LONG AS the line isn't empty" β€” then dare to delete the banana-collecting line and run it (psst: the Reset button saves you if it hangs) to witness an infinite loop firsthand.