Question: Question B1: Compute_file (7 points) Create a function compute file(filename) which takes an input string filename that refers to a textfile. The textfile should contain

 Question B1: Compute_file (7 points) Create a function compute file(filename) which

Question B1: Compute_file (7 points) Create a function compute file(filename) which takes an input string filename that refers to a textfile. The textfile should contain one positive number per line. Your function should read the values in the text file and returns (file_minimum,file_average,file_maximum) where file_minimum is the minimum value of the numbers in the text file, file_average is the average value of the numbers in the text file, and file maximum is the maximum value of the numbers in the text file. If a line contains a non-numeric data, your function should skip that line. For the purpose of this question, if there is an error reading from the file, return False. Assume that the file contains at least one line of numerical number In : # YOUR CODE HERE raise NotImplementedError() In compute_file('test.txt')(65.0, 86.0, 100.0)

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!