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 (4) 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 : 17.2 Negative average: -12.1 Zeroes found: 1 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: 17.1-12.2; -1217.3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!