Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This problem involves reading from and writing to files It also involves the Accumuator Pattern Where you would usually have a tab to indent, use
This problem involves reading from and writing to files It also involves the Accumuator Pattern Where you would usually have a tab to indent, use four spaces. There is no prompting for file names. They are hardcoded. Input file name: data.txt Output file name: summary.txt The input file contains numbers, one number per line. You should write a complete Python program to calculate the average of postive numbers the average of negative numbers and a count of zeroes found in the input file. The format of any output MUST be duplicated. The following report should be written to the output file: Positive average : Negative average: Zeroes found: After writing those three lines to the output file. The following line is printed to the screen: See summary.txt You should be computing the values shown on the three lines being written to the output file, if the input file contained the following numbers: ;
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