tracebacks — cursor wrote this and crashed6 / 9
print and breakpoint — finding the bad value before ai does
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.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _