promptdojo_

Loops — read it, predict it, then trust it — step 7 of 10

Claude wrote a loop that's supposed to print 1, 2, 3, 4, 5 (one per line) but it stops at 4. This is a classic loop bug AI can ship.

Fix line 1 so the loop prints all five numbers.

The break is on line 1 — but read the whole snippet first.

full-screen editor opens — close anytime to keep reading.