Difference between revisions of "CSC111 Final Exam 2010"

From dftwiki3
Jump to: navigation, search
Line 6: Line 6:
 
This exam is given '''under the rules of the honor code.'''  It is open-books, open-notes, and open-Web.  The work on this exam is to be done '''individually''', and assistance from anybody other than the instructor is forbidden.  TAs are not available to answer questions, and will be asked not to answer any questions relating to this exam.  No pair-programming is allowed.   
 
This exam is given '''under the rules of the honor code.'''  It is open-books, open-notes, and open-Web.  The work on this exam is to be done '''individually''', and assistance from anybody other than the instructor is forbidden.  TAs are not available to answer questions, and will be asked not to answer any questions relating to this exam.  No pair-programming is allowed.   
  
Any program section greater than a function used and taken from a Web site other than our CSC111 Web page should be cited in the header of your program.
+
Any program section greater than a function used and taken from a Web site other than our CSC111 Web page should be cited in the header of your program, or the header of the function.
  
 
Questions can only be asked to your instructor, and only via email.  Email questions will be returned with an answer to the whole class.   
 
Questions can only be asked to your instructor, and only via email.  Email questions will be returned with an answer to the whole class.   
Line 16: Line 16:
 
:[[Image:HistoricStationDataUKWeather.png | right | 200px]]
 
:[[Image:HistoricStationDataUKWeather.png | right | 200px]]
 
You have to write a program that reads weather data from the Web, process the data, and output the answers to several questions.
 
You have to write a program that reads weather data from the Web, process the data, and output the answers to several questions.
 +
 +
Call your program '''final1.py'''
  
 
The Web site http://www.metoffice.gov.uk/climate/uk/stationdata/ keeps records of temperatures for '''37''' 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 '''37''' towns/cities of the UK for the past few years, going back in some cases to 1853.
  
Your assignment will deal with reading the data from this site, for all the cities, gathering some statistics, and output information.
+
Your assignment will deal with reading the data from this site, for all the cities, gathering some statistics, and outputting information in a nice, human readable format.
  
 
===Accessing the Data===
 
===Accessing the Data===
Line 25: Line 27:
 
* The main address for the data is that of the Met-Office site:  http://www.metoffice.gov.uk/climate/uk/stationdata/   
 
* The main address for the data is that of the Met-Office site:  http://www.metoffice.gov.uk/climate/uk/stationdata/   
  
* Note: in case the metoffice.gov.uk were to go down during the exam period, the data has been replicated at http://cs.smith.edu/~111c/climate/uk/stationdata/, and you can use this Url instead.  The data files are the same at both places.
+
* Note: in case the metoffice.gov.uk were to go down during the exam period, the data has been replicated at http://cs.smith.edu/~111c/climate/uk/stationdata/, and you can use this Smith-based Url instead.  The data files are the same at both places.
  
 
* A file name is associated with each city or town.  For example, the city of '''Aberporth''' is associated with '''aberporthdata.txt''', and the record of the weather data for '''Aberporth''' is stored at URL http://www.metoffice.gov.uk/climate/uk/stationdata/aberporthdata.txt
 
* A file name is associated with each city or town.  For example, the city of '''Aberporth''' is associated with '''aberporthdata.txt''', and the record of the weather data for '''Aberporth''' is stored at URL http://www.metoffice.gov.uk/climate/uk/stationdata/aberporthdata.txt
Line 207: Line 209:
 
* 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]].
  
* Your program should accept estimated data as well as real data.  In other words, data followed by an asterisk should not be dropped or skipped.
+
* Your program should accept ''estimated'' data as well as ''real data''.  In other words, data followed by an asterisk should not be dropped or skipped.
  
 
===Processing===
 
===Processing===
Line 219: Line 221:
 
* Your program should print '''"Answer to Question 1"''', '''"Answer to Question 2"''', etc. for each question.
 
* Your program should print '''"Answer to Question 1"''', '''"Answer to Question 2"''', etc. for each question.
  
* All temperatures should be reported in degrees Fahrenheit.
+
* All temperatures should be reported in degrees '''Fahrenheit''' (they are all in Celcius on the Web site).
  
 
;Question 1
 
;Question 1
Line 227: Line 229:
  
 
;Question 2
 
;Question 2
: For which town or towns do we have the lowest temperature recorded?  Also output the year of the measurement.
+
: For which town or towns do we have the lowest temperature recorded?  Also output the month and year of the measurement.
  
: The output should be of the form: ''the coldest temperature was recorded in ''townname'' in ''month'' of ''year''"
+
: The output should be of the form: ''the coldest temperature was recorded in ''townname'' in ''month'' of ''year''" where ''month'' is either Jan, Feb, Mar, Apr... Dec.  Numbers are not acceptable.  If the month is not specified, then simply output the year.
  
 
;Question 3
 
;Question 3
: For which town or towns do we have the highest temperature recorded? Also output the year of the observation.
+
: For which town or towns do we have the highest temperature recorded? Also output the month and year of the observation.
  
 
: Same output format as for Question 2
 
: Same output format as for Question 2
Line 242: Line 244:
  
 
;Question 5
 
;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.
+
: 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 you document your program well and explain how you compute the answer.
  
 
;Question 6
 
;Question 6
Line 248: Line 250:
  
 
: Make sure your program outputs all the data required to support your answer, all in a humanly readable format.
 
: Make sure your program outputs all the data required to support your answer, all in a humanly readable format.
 +
 +
==Submission==
 +
 +
  submit final final1.py
 +
 +
*Programs submitted after 4:00 p.m. on the due date will not be graded.
 +
 +
==Advice==
 +
 +
* A program that runs is worth more than one that doesn't.  Even if the one that doesn't attempts to run computation aimed at answering all the questions.
 +
 +
* Start small
 +
 +
* Concentrate on the easy questions first.  There is nothing sacred about the order in which the questions above are ordered.  The order in which the program outputs the results is important, though.
 +
 +
* Submit regularly.  Whenever you have a version of your program that works, just submit it.  Every submission overwrites the previous version submitted.
 +
 +
* Be resourceful.  There won't be any extension due to failure of the computer, either beowulf or yours.  Python can run on all the various platforms available to you.  As long as the computer you are using can access the Web, you can write a program for the final.  In case beowulf is down on the last day of exam period, email your program to your instructor (thiebaut@cs.smith.edu) before the 4:00 p.m. deadline.
 +
 +
* Good luck!
 
</onlydft>
 
</onlydft>
 
<br />
 
<br />

Revision as of 09:21, 29 April 2010


...