Skip to content

Commit 6e438f9

Browse files
authored
docs: add instructions for calculating grade intervals (#908)
fixes #681
1 parent 959759c commit 6e438f9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

exercises/concept/making-the-grade/.docs/instructions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ letter_grades(88);
8080
// => {41, 53, 65, 77}
8181
```
8282

83+
### How to calculate the intervals
84+
85+
The score needed to avoid failing is always 41.
86+
The remaining score range, from 41 to the highest score, should be divided into four equal intervals, one for each letter grade.
87+
88+
- Subtract 40 from the highest score to get the total range of scores that qualify for letter grades (A to D).
89+
- Divide this total range by 4 to get the size of each grade interval.
90+
- Add this interval size to 40 repeatedly to calculate the lower bounds for each letter grade.
91+
8392
## 5. Matching Names to Scores
8493

8594
You have exam scores in descending order, and the respective student names (sorted in the order of their exam scores).

0 commit comments

Comments
 (0)