promptdojo_

print and breakpoint — finding the bad value before AI does — step 6 of 9

AI shipped this and the output is 0 instead of 15. There's no traceback — the function silently returns the wrong value. The bug is on line 4: the loop body never updates result. Fix line 4 so the script prints 15.

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

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