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
Get step-by-step solutions from verified subject matter experts
