conditionals — where ai silently bugs8 / 8
conditionals and the truthiness traps
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 (because tier is "gold" and points is greater
than zero).
Use == for the string and is not None for the points check.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _