loops — predict the output6 / 9
while, break, and the infinite loop ai ships
Claude wrote this and Pyodide will hang if you run it. The loop is supposed
to count down from 5 to 1, but the body never changes count, so the
condition count > 0 stays True forever.
Add the missing line so the loop actually stops, and the script prints
5, 4, 3, 2, 1 each on its own line.
The break is on line 4 — but read the whole snippet first.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _