Added the grades function and the program does work.
Output needs to be changed to match the instructor's.