Question
PLEASE USE PYTHON. THANK YOU! Write a function IN PYTHON, write_input that has one string argument representing a filename and returns no value. The function
PLEASE USE PYTHON. THANK YOU!
Write a function IN PYTHON, write_input that has one string argument representing a filename and returns no value. The function uses a while loop to get numbers from the user then write those numbers each on one line in the file which name was the argument of the function. Write another function, read_output that has one string argument representing a filename and returns no output (once you complete the assignment and for your own practice, think how you would change this function to return a string output - how would you use it from main?). The function uses a for loop to read numbers from the file then displays those numbers each on one line in the output. At the end, the function shows the minimum, maximum, and the average. From main, using a 3 choice menu of 1. Save data (which runs write_input), 2. Get stats (which runs read_output), and 3. Quit, write the needed code to implement the three menu items.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started