Level 15 of 50
while loop
explained with mobile balance. Watch the reel, then work through it below: run the code, take the quiz, keep the cheat sheet.
📒 Open the cheat sheetSanaMy mobile balance drops with every single call!
TeacherKeep calling WHILE there's balance left? That's a while loop!
balance.py
balance = 30 while balance > 0: print(balance) balance -= 10
TeacherWhile the condition is True, the block repeats. Each call costs 10!
SanaWhat if I forget the -= 10 line?
TeacherThen balance never drops, and the loop runs FOREVER! Always change the variable!
⏸ Pause & predict: what prints?
roti = 0 while roti < 3: roti += 1 print(roti, "rotis")
Where this leads
Python is step one. Building AI that ships is the rest.
The diploma takes you from zero to deployed computer vision, LLM and agent projects, with engineers who build them for a living. Already code? The bootcamp does it in three months.