Final answer:
This is a program that calculates grades based on user input of grading criteria and scores for different types of assignments. It then tells the student what their current grade is without the final exam, and what score they need on the final for various letter grades.
Step-by-step explanation:
Calculating Grades
In this program, you will prompt the user for the grading criteria for a class. Then, you will ask the user for grades/averages for the different types of assignments in the class, and calculate their current grade if they do not take the final. Finally, you will tell them what score they need on the final for various letter grades.
Here are a couple of test cases:
Test Case 1:
How many tests were given? 2
Percentage weight of Test 1: 5
Percentage weight of Test 2: 15
Percentage weight of Final: 20
Percentage weight of Homework (0 for no hw): 20
Percentage weight of Programs (0 for no pgms): 40
Test 1 score: 80
Test 2 score: 90
Homework Average: 99
Program Average: 88
Your current numeric score in the class (without the final) is 72.5
If you did not take the final, you would get a "C" in the class
To get a "B" in the class, you would need to score a 37 on the final
To get an "A" in the class, you would need to score a 87 on the final
Test Case 2:
How many tests were given? 2
Percentage weight of Test 1: 10
Percentage weight of Test 2: 10
Percentage weight of Final: 20
Percentage weight of Homework (0 for no hw): 20
Percentage weight of Programs (0 for no pgms): 40
Test 1 score: 60
Test 2 score: 62
Homework Average: 64
Program Average: 66
Your current numeric score in the class (without the final) is 51.4
If you did not take the final, you would get an "E" in the class
To get a "D" in the class, you would need to score a 43 on the final
To get a "C" in the class, you would need to score a 93 on the final
It is not possible for you to get an "A" or "B" in the course
Make sure to check the user-inputted percentages add up to 100, and handle cases where there is no homework or programs. Your program should also not output any "impossible situations". Format your code and output nicely.