Difference between revisions of "CSC111 Final Exam 2010"

From dftwiki3
Jump to: navigation, search
Line 13: Line 13:
 
</bluebox>
 
</bluebox>
  
==Temperatures in the UK==
+
==Problem #1: Temperatures in the UK==
 +
 
 +
You have to write a program that reads weather data from the Web, process the data, and output the answers to several questions.
  
 
The Web site http://www.metoffice.gov.uk/climate/uk/stationdata/ keeps records of temperatures for several towns/cities of the UK for the past few years, going back in some cases to 1853.
 
The Web site http://www.metoffice.gov.uk/climate/uk/stationdata/ keeps records of temperatures for several towns/cities of the UK for the past few years, going back in some cases to 1853.
Line 201: Line 203:
 
===Format of the data===
 
===Format of the data===
  
* the format of the data is explained at http://www.metoffice.gov.uk/climate/uk/stationdata/, a copy of which is available [[media:www_metoffice_gov_uk.pdf| here]].
+
* The format of the data is explained at http://www.metoffice.gov.uk/climate/uk/stationdata/, a copy of which is available [[media:www_metoffice_gov_uk.pdf| here]].
 +
 
 +
===Processing===
 +
 
 +
* You are free to choose the way you are going to process the data, but you are required to define and use one or several classes. 
 +
 
 +
===Questions needing answers===
 +
 
 +
* Your program should output '''formatted''' answers to the questions listed below.  By formatted, I mean something written in English and not in Python ("The coldest years were 1914 and 1931" is formatted.  "[1914, 1931]" is not formatted.)
 +
 
 +
* All temperatures should be reported in degrees Fahrenheit.
 +
 
 +
;Question 1
 +
: For which town (or towns) do we have the oldest recorded information?  Although we can get the answer by searching the table above, make your program figure out the answer.  If two or more towns have records for the same month and year, and these are the oldest on record, then output the name of each town.
 +
 
 +
;Question 2
 +
: For which town or towns do we have the lowest temperature recorded?  Also output the year of the measurement.
 +
 
 +
;Question 3
 +
: For which town or towns do we have the highest temperature recorded? Also output the year of the observation.
 +
 
 +
;Question 4
 +
: For which town do we have the biggest '''yearly''' difference in temperature?  In other words, where did we record during the same year the largest difference between coldest and hottest temperature?
 +
 
 +
;Question 5
 +
: If we are interested in retiring in the U.K., and are looking for the place with the most sun exposure per year, which city should be picked?  Make sure your program prints a sentence or two along with your answer explaining how you compute the answer.
  
 
</onlydft>
 
</onlydft>

Revision as of 15:17, 28 April 2010


...