Difference between revisions of "CSC111 Final Exam 2015"
Line 3: | Line 3: | ||
=Problem 1= | =Problem 1= | ||
<br /> | <br /> | ||
− | This problem is based on [[CSC111_Homework_11_2015| Homework 11]]. In Problem 1 of Homework 11, the user is asked to enter the name of a file, and then the program outputs statistics about the data stored in the file. In this exam problem, the user may enter the name of '''several files''', one after the other. There is no limit on the number of files the user enters. The exam program then outputs the | + | This problem is based on [[CSC111_Homework_11_2015| Homework 11]]. In Problem 1 of Homework 11, the user is asked to enter the name of a file, and then the program outputs statistics about the data stored in the file. In this exam problem, the user may enter the name of '''several files''', one after the other. There is no limit on the number of files the user enters. The exam program then outputs the coldest temperature recorded, followed by the cities, months, and years when it was recorded. |
+ | |||
<br /> | <br /> | ||
==Requirements== | ==Requirements== | ||
Line 12: | Line 13: | ||
==Example== | ==Example== | ||
<br /> | <br /> | ||
− | ... | + | * Here is an example of the interaction to be expected between the user and the program: |
+ | <br /> | ||
+ | |||
+ | File names? armaghdata.txt ballypatrickdata.txt bradforddata.txt braemardata.txt | ||
+ | |||
+ | -8.6 Armagh Dec 1878 Braemar Jan 1963 Braemar Feb 1963 | ||
+ | |||
+ | <br /> | ||
+ | * The user enters all the files of interest on one line | ||
+ | * The program outputs the coldest temperature (-8.6, found in the tmin column of the files), followed by groups of 3 fields, where the first one is the city name (not the file name), the month (expressed as 3 letters), and the year. | ||
+ | * All fields are one one line only, and separated by a space. | ||
+ | <br /> | ||
+ | ==Submission== | ||
+ | <br /> | ||
+ | * Submit your program the Final Problem 1 section on Moodle. | ||
<br /> | <br /> | ||
=Problem 2: Frogger= | =Problem 2: Frogger= |