In: Computer Science
HW4: Practicing function definition and invocation. File access is also implemented. 1) Define a function "converT()" that can take a file name, reads line by line to convert temperatures, and returns line by line. Each line in a file begins with a temperature in number {integer or floating point}, followed by one of the temperature unit {"F", "f", "C", "c"}. If "F" or "f", convert the temperature to Celsius. If "C" or "c", convert the temperature to Fahrenheit. The format of returning value is a converted temperature followed by the converted temperature unit. For example, if a line is 45 F Then, the function returns 7.22 C 2) A file name is given by users. Assume that the file name is in fully-qualified-path. With this file name, the function is invoked. For example, it runs as follows: Enter file name: C:\\Users\\jyoon\\Desktop\\tempFile.data 45.00° in F is 7.22° in C 23.00° in c is 73.40° in F 11.00° in C is 51.80° in F 76.00° in F is 24.44° in C 88.00° in F is 31.11° in C 12.00° in F is -11.11° in C 1.00° in C is 33.80° in F Note that the file tempFile.data in the C:\Users\jyoon\Desktop directory contains 45 F 23 c 11 C 76 F 88 F 12 F 1 C SUBMIT: 1) Your source coding file. The file shows each every statement as shown the steps above, so the execution of the file shows the all print statements. 2) Screenshot(s) that may show the integrity of your work