Use the function written in the last lesson to calculate a student’s GPA. Ask them how many classes they are taking, then ask them to enter the grades for each class and if it is weighted.
Your program should then output the averaged GPA including the decimal place.
Your main program must call the function.
Hint
Make sure to use two functions to incorporate the last lesson and the current one—the GPAcalc() function and a new one.
Please fix the following input errors: