Scores 87

CLICK HERE TO DOWNLOAD THIS ANSWER INSTANTLY

Program written in Python containing:
a. A main function that displays a menu of choices. Menu choices are:
D: Display grades
C: Calculate average
X: Exit application
The menu will display until the user enters X to exit the application.
b. A function named DisplayScores that displays scores for all items in the text file. Each score should have a line number to the left starting at 1. For example: 1: 78 2: 93. (see output example below). This function accepts zero arguments and does not return any values. This function does read from a text file, so it needs error handling for IOErrors.
c. A function named CalcAverage that reads the text file, accumulates a total and divides the total by the number of items in the file. This function accepts zero arguments and returns a single value. The value returned is the class average as a result. This function does read from a text file, so it needs error handling for IOErrors and ValueErrors.
d. Program includes inline documentation about each section. For example, # declare and initialize variables these are the test scores
78
93
85
100