Question: Please write code in python Write a function that writes a series of random numbers to a file. Each random number should be in the
Please write code in python Write a function that writes a series of random numbers to a file. Each random number should be in the range of 1 through 500. The application should let the user specify how many random numbers the file will hold.
write another function that reads the random numbers from the file, display the numbers, and then displays the following: The number of random numbers read from the file, The sum of the numbers, the average of the numbers, The largest number generated, The smallest generated
Write a main function that does the following: ask the user to enter a file name to write the random numbers to, pass the file name as an argument when you call the function that writes the numbers to a file, pass the file name as an arugment when you call the function that reads the numbers for a file.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
