Grading in the United States commonly takes on the form of five letter grades (A
, B
, C
, D
and F
), with A
being the highest and F
being the lowest. Below is the grading system found to be most commonly used in United States public high schools for the conversion of numeric grades (percentages) to letter grades.
letter grade | percentage |
---|---|
A |
90%-100% |
B |
80%-89% |
C |
70%-79% |
D |
60%-69% |
F |
< 60% |
A numeric grade (percentage) expressed as a positive integer \(s \in [0, 100]\).
The letter grade corresponding to \(s\).
87
B
Spot the reasoning error that was made when writing the following code, and solve it.