Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use python code This program reads input from a text file, process that input text using dictionaries, and write formatted output to another file.
Please use python code
This program reads input from a text file, process that input text using dictionaries, and write formatted output to another file. The program starts by o first requesting the user to type in the name of the input file, and o then eequesting the user to type in the name of the output file The input file is supposed to contain numbers separated by commas. However, we all know that people make mistakes, or mistakes somehow always creep in. A sample input file (named test_input.txt) is provided for test purposes The file may contain sequences like the following: 12.34,5,5,b3.45,45-4.4, In addition, the file has multiple lines So your task is to read that file and extract and choose all legitimate numeric values. Obe condition for a numeric value being legitimate is that the number should lie between 0 and 10. Once you have the numeric values, you need to draw a histogram and provide summary statistics like: the total count of numbers processed, minimum number and maximum number. A sample output is shown below Important: Instead of sending this output to the screen, this output needs to be saved or written to a file named a2_partBout.txt. I have provided the a2_partBout.txt file that corresponds to the sample input file test_input.txt. Note from the sample output file that you will be creating 10 buckets to count the frequency. So, if a number falls between 0 and 1 ("O toStep 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