Grade from score
EasyBasics
A test is marked out of 100. Turn a score into a letter grade:
| Score | Grade |
|---|---|
| 90 to 100 | A |
| 80 to 89 | B |
| 70 to 79 | C |
| 60 to 69 | D |
| below 60 | F |
Input
One line with the score score, a whole number.
Output
The letter grade.
Constraints
- 0 ≤
score≤ 100
The input is read for you. The starter code puts it in variables; write your code under Your code here and print the answer. Changed the code already? Reset () brings the starter back.
Example 1
Input
95
Output
A
Why:
95 is between 90 and 100.
Example 2
Input
72
Output
C
Why:
72 is between 70 and 79.
Hints
Was this a good challenge?
- Solved by
- 0
- Submissions
- 0
- Accepted
- –