Computer Sciences Department logo

CS 368-1 (2010 Summer) — Day 12 Homework

Due Monday, August 2nd, at the start of class.

Weather Forecast Analysis, Part II

The purpose of this four-part project is to compare weather forecasts against actual weather observations. In this second part, you will add to your script from yesterday and make it save the forecast data. Also, you will write code to handle configuration settings from the command line and from a configuration file; the configuration code can go in the same script or in a new, separate one.


So, we have forecast data, parsed and ready to use. But we need to save it for each day. And we need to save the data carefully, so that we do not lose any previous data.

You must decide:

Then, we will start to build in some configuration settings for our analysis program. You may wish to put the analysis code, and therefore the configuration code, in a separate script — it is your choice.

We will support three settings (at least):

Your script must have sensible defaults for all settings, and must accept both command-line options and a configuration file. Which source of configuration settings gets the highest preference? Medium? Lowest?

Required Features

For today, your script(s) must:

Optional Features

Questions for Thought


Do the work yourself, consulting reasonable reference materials as needed; any reference material that gives you a complete or nearly complete solution to this problem or a similar one is not OK to use. Asking the instructors for help is OK, asking other students for help is not.

Hand In

A printout of your script(s). Be sure to put your own name in the initial comment block of the code. Identifying your work is important, or you may not receive appropriate credit.