Difference between revisions of "CSC111 Final Exam 2015"

From dftwiki3
Jump to: navigation, search
Line 26: Line 26:
 
* Store your program in a file called '''final1.py'''.
 
* Store your program in a file called '''final1.py'''.
 
* The program should get the names of the temperature files as one long line (see Example section below).
 
* The program should get the names of the temperature files as one long line (see Example section below).
* If one of the names given is invalid (the file does not exist), your program should simply print "Invalid file name given." and stop, without outputting any temperature information.
+
* If one of the names given is invalid (the file does not exist), your program should simply print "Invalid file name given." and stop, without outputting any temperature information, even if the other file names are valid. (The test program will check for the presence of the word "invalid" in your output.)
 
<br />
 
<br />
 
==Example==
 
==Example==
Line 46: Line 46:
 
   
 
   
 
  -8.6 Armagh Dec 1878 Braemar Jan 1963 Braemar Feb 1963
 
  -8.6 Armagh Dec 1878 Braemar Jan 1963 Braemar Feb 1963
 +
 +
 +
 +
File names? armaghdata.txt ballypatrickdata.txt bradforddata.txt braemardata.txt notAGoodFileName.zip
 +
 +
Invalid file name!
 
   
 
   
 
<br />
 
<br />

Revision as of 09:31, 30 April 2015


...