Question: 5 . 2 4 ( Ch 5 ) HW: Grades statistics ( letter grade counts ) Write a program that lets a teacher convert exam

5.24(Ch 5) HW: Grades statistics (letter grade counts)
Write a program that lets a teacher convert exam grades for his/her class from scores to letter-grades, then calculate how many grades are in each letter-grade category.
(1) The program first gets a list of integers from input. The input begins with an integer indicating the number of grades (integers) that follow. As you read each integer representing a grade, transform it into a letter-grade, based on the grading scale below, and update a counter variable for that letter-grade. For example, if you read in an 88, that number is transformed into a "B" based on the grading scale, and the counter for how many letter-grade "B"s should be incremented. Hint: you can have a different variable for each letter-grade counter.
Grading scale:
-90 to 100(both inclusive)=> A
-80 to 89(both inclusive)=> B
-70 to 79(both inclusive)=> C
-60 to 69(both inclusive)=> D
-0 to 59(both inclusive)=> F
(2) Print the numbers of \(\mathrm{As},\mathrm{Bs},\mathrm{Cs},\mathrm{Ds}\), and Fs . For example, if the input is:
```
9
80
75
100
86
82
93
72
60
55
```
where the 9 indicates that there are nine grades to read, namely \(80,75,100,96,82,93,72,60,55\). Then the output from the program should be:
The distribution of letter grades is: 2 As,3 Bs,2 Cs,1 Ds,1 Fs.
5 . 2 4 ( Ch 5 ) HW: Grades statistics ( letter

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!