Question: In python, write a program that calculates the average of all the numbers stored in the attached numbers.txt file. The program should handle: any OSError

In python, write a program that calculates the average of all the numbers stored in the attached numbers.txt file. The program should handle: any OSError that is raised trying to read the file, any ValueError that is raised when non-numeric data is found in the file, and any other exception.

numbers.txt

50

40

30

20

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!