promptdojo_

Conditionals and the truthiness traps — step 6 of 8

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.

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