Question: Can you help me , please, modify my code? Modify GradesFile class from Lecture 8 Assignment. Add a new function called loadGradesData . The header
Can you help me please, modify my code?
Modify GradesFile class from Lecture Assignment. Add a new function called loadGradesData The header of this function is def loadGradesDataself This function uses a loop to load grades in the file defined by filename attribute of the class to a list and return the list to the caller. Modify init function to add one more data attribute gradesList Inside init function, call loadGradesData function and assign the returned value to gradesList Modify calculateAverage function to use the data attribute gradesList to calculate average grades. Main function remains unchanged.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
