Difference between revisions of "CSC111 Final Exam 2015"
Line 142: | Line 142: | ||
Invalid file name. Please reenter | Invalid file name. Please reenter | ||
File name? twitterFeed.txt | File name? twitterFeed.txt | ||
− | Location of interest? | + | Location of interest? northampton |
keyword of interest? Maya | keyword of interest? Maya | ||
− | ---Output--- | + | File name? twitterFeed.txt |
− | + | --- Output --- | |
− | + | 252 tweets read | |
− | + | earliest: 20141110 02:21:14 | |
− | Number of distinct locations | + | latest: 20150423 09:31:16 |
− | Number of times | + | Number of distinct locations: 24 |
− | Number of times Maya appears in text | + | Number of times Location "northampton" appears: 114 |
− | + | Number of times "Maya" appears in text: 5 | |
<br /> | <br /> | ||
* Your program must match this output as closely as possible, including the "---Output---" line. Remember that your program will be tested with a collection of tweets that will be different, and probably gathered in a different time period, so your program must locate the oldest and newest tweets, and not simply output the dates shown above! | * Your program must match this output as closely as possible, including the "---Output---" line. Remember that your program will be tested with a collection of tweets that will be different, and probably gathered in a different time period, so your program must locate the oldest and newest tweets, and not simply output the dates shown above! | ||
Line 157: | Line 157: | ||
==Testing== | ==Testing== | ||
<br /> | <br /> | ||
− | * Test your program well. In particular, your program should be able to not crash if the file given to it contains only 1 entry, or if the file is empty | + | * Test your program well. In particular, your program should be able to not crash if the file given to it contains only 1 entry, or if the file is empty. |
* You can assume that all entries will always contain 4 fields (date, location, screen-name, and text). | * You can assume that all entries will always contain 4 fields (date, location, screen-name, and text). | ||
+ | * When looking for the number of unique locations found in the tweets, "Northampton, MA" and "Northampton, Massachusetts" count as 2 different locations. Basically if the lowercase versions of two different locations are not equal, the locations are distinct. "Northampton MA" and "Northampton, MA" are distinct (because of the comma). "northampton" and "Northampton" are the same. | ||
<br /> | <br /> | ||
==Submission== | ==Submission== |