Practice · 1 of 2
Write a Grader
CHALLENGE
Difficulty: beginner+25 XP
Write a function grade(score) that returns a letter grade string:
- 90 or above returns "A"
- 80–89 returns "B"
- 70–79 returns "C"
- anything below returns "Keep practicing"
Then log the result of grade(85) and grade(92).
Press Submit to check your solution.
Back to lesson: Practice: Making Decisions: if / else — Practice