An AI assistant drafted the grade calculator below. It runs, but the acceptance checks fail at the exact cutoff scores.
Your job is the one an engineer actually does with AI-written code: work out what it got wrong, and fix it.
Two behaviours are wrong:
- A score of exactly 90 is not getting an A.
- A score of exactly 70 is not getting a C.
The rule is: 90 and above is an A, 80 to 89 is a B, 70 to 79 is a C, below 70 is an F. Press Run to see the checks fail, then fix letter_grade so all of them pass. Keep the function signature unchanged.
You have an AI assistant available. Use it however you normally would - how you direct it and whether you check its answers is part of what we look at.