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.
⌘↵ runs the editor.read, then continue.
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.
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.