Write a Python program to compute the average GPA of the courses taken by a student. The program gets the grade and credit count of each course from the user. The grades can be A, B, C, D, or F and the credit counts can be 2, 3, or 5. The program checks the validity of the grades and credit counts before using them. The program continues ignoring invalid inputs until a valid value is entered by the user. Moreover, the user enters DONE after entering the grade and credit count of all courses. To calculate the average GPA, the program first computes the grade points for each course, which is the multiplication of the equivalent numerical grade (A: 4.0, B: 3.0, C: 2.0, D: 1.0, and F: 0.0) and the credit count of the course. Next, the program calculates the total grade points, the sum of the grade points of all courses, and divides it to the total credit count. For example, if a student got grade A for the first course, which has credit count of 3 and C for the second course with credit count of 5, then the average GPA of the student is (4.0 * 3 + 2.0 * 5) / (3 + 5) = 2.75. Finally, the program prints the average GPA with two digits of precision in the screen.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more