Question: Write a program that contains the following functions: - a function that will ask the user for a test score. Only scores from 0 to

Write a program that contains the following functions:

- a function that will ask the user for a test score. Only scores from 0 to 100 are valid. If the user enters an invalid score, the function should ask them again for a valid score. The function should catch any exceptions that could be generated if the user enters non-numeric data. Once a valid score is entered, the function should return that score.

- a function that will accept a list of numbers and return the average.

The program should ask the user for three test scores, using the function described above to get valid scores. The program should then put those scores in a list and call the other function described above to get the average score. Finally, the program should display that average to the user.

Full credit if you use a loop so the number of scores can easily be changed, for example from 3 to 4, by just modifying a single parameter. Most of the credit even if it's not a loop.

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 Databases Questions!