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 8 Assignment. Add a new function called loadGradesData. The header of this function is def loadGradesData(self). 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.
Can you help me , please, modify my code? Modify

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!