Question: Marks for this submission: 1.00/1.00. You are given a data file, THUMlog.txt, which contains many records. The start of the file loc s like this:
Marks for this submission: 1.00/1.00. You are given a data file, THUMlog.txt, which contains many records. The start of the file loc s like this: #DATE TIME TEMPERATURE UNIT HUMIDITY% 9/28/2010 15:45:14 22.248900 C 44.721968 9/28/2010 16:00:07 22.738900 C 50.539993 9/28/2010 16:15:07 23.388900 C 49.339338 9/28/2010 16:30:07 23.918900 C 47.539280 9/28/2010 16:45:08 23.668900 C 40.700378 The first line is just a comment, and is there to help a human understand the data that they are seeing; it should be ignored (hint: any line beginning with ought to be skipped.) Write a program to read the data from the file and produce the average temperature and average humidity for all the records in the file. This is a very large file - it is the actual temperature and humidity data from our server room. You would spend hours trying to do this manually, with a calculator, and you likely would make mistakes along the way. This is where computers are far superior to humans when dealing with boring, repetitive tasks The output of the program will look like: Average Temperature (c): NN.NNNNNNNNNNNNNN Average Humidity (S): NN.NNNNNNNNNNNNNN (of course, N will be replaced with the numbers you calculate. ) Answer: (penalty regime: 0 %)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
