Python homework
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.
Hint: DO NOT use dictionary to map letter grades to their numerical equivalents. Use if/else or elif instead.
7 years ago
10
Purchase the answer to view it

Purchase the answer to view it

- Order1018216.docx
Purchase the answer to view it

- py-avg-gpa.zip
- "A" WORK BUT PLAGIARISM FREE NEED IN 15 HOURS
- Jos new class
- Linear Equations and Inequalities
- Principles of Accounting
- Impacts of Trade Agreements
- Starbuck's - Mangerial Economics/Capital Budgeting
- For exceptionalgeek only Please no others the answer will be no
- submit the following homework assignments obtained from the textbook Managerial Accounting, 11th Edition, by Ronald Hilton Problem 11-43, Chapter 11 Moodle permits posting of 5 files. Use Excel when appropriate and follow the requirements described in t
- Critical Thinking Discussion question - History
- Business questions