#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.700378The 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 this: Average Temperature (C): NN.NNNNNNNNNNNNNN Average Humidity (%): NN.NNNNNNNNNNNNNN
#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.700378The 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
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 this:
Average Temperature (C): NN.NNNNNNNNNNNNNN
Average Humidity (%): NN.NNNNNNNNNNNNNN
Step by step
Solved in 3 steps with 3 images