* x == i => "x is i"
* (i - 1/4) <= x <= (i + 1/4) => "x is approximately i"
* (i - 1/2) < x < i => "x is less than i"
* i < x < (i + 1/2) => "x is greater than i"
* x == i + 1/2 => "x is between i and i + 1"
Write and document a Python script numdesc.py which takes as a command-line argument a file of positive real numbers (one per line) and outputs for each real its description relative to the rules given above. Your script must work on datafile numdesc1.dat to produce the output given in typescript-file numdesc.script. You may assume that all given files are formatted correctly.
In Q2, you may find the string-methods lower() and/or upper() of use.
######################################################### ## CS 2500 (Fall 2009), Assignment #3, Question #1 ## ## Script File Name: numdesc.py ## ## Student Name: Todd Wareham ## ## Login Name: harold ## ## MUN #: 8008765 ## #########################################################You do not have to develop your code on our CS departmental systems. However, as your code will be interpreted and tested on our CS departmental systems as part of the assignment marking process, you should ensure that your code interprets and runs correctly on at least one of these systems.
Created: August 20, 2009
Last Modified: September 30, 2009