Question: Hi! I need helps on this question. Please concern and answer to the question on this assignment and its requirement, and also can you make
Hi! I need helps on this question. Please concern and answer to the question on this assignment and its requirement, and also can you make sure it works. I got some feedback that cannot run.
Thank you so much!


Write a file named gpa.py that computes a cumulative GPA using three functions: add_course adds a new course to the running total, and gpa and credit-total gets your cumulative GPA and credit count, respectively. It uses two global variables to keep track of GPA and credits (both initially 0) Invoking gpa.add_course(3.7, 3) should add a 3-credit course with GPA 3.7 to the running GPA and credit count total. Invoking)should retrieve your current total GPA. Invoking spa.credit_total() should retrieve your current total credits earned. Invoking gpa.add_course with only one argument (e.g., gpa.add_course(3.7)) should add a 3-credit course. None of the functions nor the file itself should print anything nor ask for any input. 2. Example Invocations When you run gpa.py, nothing should happen. It defines a function, it does not run it. If in another file (which you do not submit) you write the following: import gpa gpa.add_course(4.0, 3) print(gpa.gpa), gpa.credit_total)) gpa.add_course (3.3) print (spa.gpa), gpa.credit total()) gpa.add_course(2.3, 4) print(spa-gpa(), gpa.credit_total)) you should get the following output 4.03
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
