Question: how do I approach this question? How do I open the file and find the smallest and largest number? Define the get_biggest_difference( filename) function which
how do I approach this question? How do I open the file and find the smallest and largest number?

Define the get_biggest_difference( filename) function which is passed a string as a parameter: the name of the file to be read. The file contains integers each separated by white space. The function reads the information from the file and returns the absolute value of the difference between the largest number and the smallest number in the file. For example, if filename refers to the following file: . . . Lab07Q03_1.txt - Edited 14 15 18 18 19 11 15 13 the value 8 is returned by the function (the difference between 11 and 19). For example: Test Result filename = "Lab07003_1. txt" 8 print (get_biggest_difference ( filename) ) filename = "Lab07Q03_2. txt" 15 print (get_biggest_difference( filename) )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
