Question: Read in 'marks.txt'. The file format is one number per line. Your program will run through all these numbers, and ensure that they are valid

Read in 'marks.txt'. The file format is one number per line. Your program will run through all these numbers, and ensure that they are valid input.

Create two lists: one for valid numbers, one for invalid numbers.

For a number to be valid, the number:

Must not have any letters inside of it

Must be greater than or equal to 0

Must be less than or equal to 100

Print out the list of bad inputs, and print out the average of the good inputs.

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!