functions — and the most-hallucinated bug ai ships9 / 9
functions and the missing return
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 function discount that's supposed to take a price
and a percent off, and hand back the new price. The function body is missing
the line that does the math and returns the answer.
Finish the function so the script prints final: 80.0.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _