Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
