Difference between revisions of "CSC111 Final Exam 2015"
Line 25: | Line 25: | ||
<br /> | <br /> | ||
* Store your program in a file called '''final1.py'''. | * Store your program in a file called '''final1.py'''. | ||
+ | * Make sure your program contains a '''main()''' function, and that the execution starts with main, with this code, which should be the last 2 lines of your program: | ||
+ | <br /> | ||
+ | ::<source lang="python"> | ||
+ | if __name__=="__main__": | ||
+ | main() | ||
+ | </source> | ||
+ | <br /> | ||
* 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, even if the other file names are valid. (The test program will check for the presence of the word "invalid" in your output.) | * 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.) |