Programming
Assignment 14
Write a program to
process an arbitrary number of student grades.
It should do the following:
1. Read in each student's name and three
exam scores.
2. Calculate the average of the three exam
scores (use a function).
3. Calculate the letter grade based on the
following table (use a function):
Average Grade
90
- 100 A
80
- 89 B
70
- 79 C
60
- 69 D
0 -
59 F
4. Print the name, letter grade, and a bar
graph representing the average score for each student. ( Use a function to
print the stars.)
5. Print the class average, highest
average, lowest average, and the total number of A's, B's, C's, D's, and F's.
Your program should
read until it runs out of data.
April 70 80 90
Bob 90 90 90
Carol 60 70 80
Dave 40 50 60
Edna
100 100 100
Fred 80 80 80
| F D C B A
April B |********************
Bob A |*************************
Carol C |***************
Dave F |*****
Edna A |*************************
Fred B |********************
Class
average: 78
Highest
average: 100
Lowest
average: 50
Grade Number
----- ------
A
2
B
2
C
1
D
0
F
1