conditionals — where ai silently bugs6 / 8
conditionals and the truthiness traps
Claude wrote a function that's supposed to print score: 0 when the score is
zero. Instead it prints no score yet because if score: treats 0 as
falsy — same as None.
This is one of the most common silent bugs in AI-generated code. Fix line 3
so a real score of 0 prints correctly.
The break is on line 3 — but read the whole snippet first.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _