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.