I have an Python assignment at hand, and I was wondering if you guys can point me in the right direction. I have done the assignments so far up to date, but this one seems to be a bit more advanced and I have a midterm on Friday that will have elements of this program in it, and I'd love for you guys to add any insight you may think that can be beneficial in regards to this program. Thank you.
"The input will be a text grade file, which I called grade_file.py in my case, so I could edit it with the IDLE editor, in a form as shown below.
COURSE A 4
COURSE B 3
COURSE C 5
COURSE D 5
Note that each line has three pieces of information, separated by spaces. The first is the name of the course, the second is the letter grade, and the third is the number of units. In order to make the computation of the numerical value for the grade a simple formula in the letter grade, the only legal values or the letter grades are A, B, C, D, and E, with the numerical point values
A 4
B 3
C 2
D 1
E 0
so that E is like our F, and no + or - can be added after the letter.
The total numerical points are calculated by adding up the products of the the units time the grade's numerical point value for for all the courses, and then dividing by the total number of units.
Write a program that can prompt the user for the name of the grade file, and compute the GPA from the data in the file. The GPA should be printed out with exactly 3 places to the right of the decimal point. Below are the results of my program on the input data above, with the user input in bold. (Note that the grader will use a different grade data file, with a different name.)
Enter the name of the file of grades: grade_file.py The GPA is 2.353"
Thanks again guys.