Write a python program to compute the average gpa


Python Assignment

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.

Format your assignment according to the following formatting requirements:

1. The answer should be typed, double spaced, using Times New Roman font (size 12), with one-inch margins on all sides.

2. The response also include a cover page containing the title of the assignment, the student's name, the course title, and the date. The cover page is not included in the required page length.

3. Also Include a reference page. The Citations and references should follow APA format. The reference page is not included in the required page length.

Solution Preview :

Prepared by a verified Expert
Python Programming: Write a python program to compute the average gpa
Reference No:- TGS02965514

Now Priced at $30 (50% Discount)

Recommended (92%)

Rated (4.4/5)