promptdojo_

Conditionals and the truthiness traps — step 8 of 8

Checkpoint

One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.

One last thing. AI wrote a discount-rule script. The starter has the right branches but the conditions are missing. Finish lines 4 and 6 so the script prints vip discount.

Catch: points = 0 is a valid score (user has a record, just zero). The truthy check if points: falls through to the wrong branch. Use is not None so a real zero still counts.

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