Write a program for the following problem. An instructor needs a program that accepts a student identification number and three test scores, test1, test2, and final_test as input, and determines and outputs for each student the semester average and the final letter grade according to the following scheme:
SEMESTER AVERAGE FINAL LETTER GRADE
90 – 100 A
80 – 89 B
70 – 79 C
60 – 69 D
0 – 59 F
The semester average for students is computed using the formula
semester_average = 0.20 * test1 + 0.30 * test2 + 0.50 * final_test
Student identification numbers are four-digits integer. Input should terminate when the instructor types 0 for the student identification number. The instructor also wants a distribution of letter grades and a class average. Class average is computed using the following formula:
class_average = (4 * number_of_A_grades + 3 * number_of_B_grades + 2 * number_of_C_grades + 1 * number_of_D_grades)/number_of_students