Exercise · Conditions · lesson 7 of 8
Exercise: letter grade
Write a function grade(score) that turns a score into a grade. It returns:
"A"for 90 points or more;"B"for 75–89 points;"C"for 60–74 points;"F"for fewer than 60 points.
Examples:
grade(90)→"A"grade(74)→"C"grade(59)→"F"
Constraints: score is an integer from 0 to 100 inclusive.
Do not add extra imports unless the task says so explicitly.
Subscribe to take the course
The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.