Difference between revisions of "CSC111 Final Exam 2015"

From dftwiki3
Jump to: navigation, search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<onlydft>
 
  
 
<bluebox>
 
<bluebox>
 
This exam is a take-home exam given under the rules of the [http://www.smith.edu/sao/handbook/socialconduct/honorcode.php Smith College Honor-Code].  Please make sure you read it and understand it.   
 
This exam is a take-home exam given under the rules of the [http://www.smith.edu/sao/handbook/socialconduct/honorcode.php Smith College Honor-Code].  Please make sure you read it and understand it.   
 
<br />
 
<br />
The exam is open book, and open Web.
+
The exam is open book, open notes, and open Web.
 
<br />
 
<br />
You have to do the work individually.  You cannot seek help from anybody for this exam.  The TAs will not have TA hours, and will not be allowed to answer questions relating to Python or the class material.  All questions relating to this Final should be directed to your instructor, and posted on Piazza.  Posting on piazza should not contain any code.  Only questions meant to clarify the exam are allowed.  No debugging-related questions will be answered.  
+
You have to do the work '''individually'''.  You cannot seek help from anybody for this exam.  The TAs will not have consulting hours, and will not be allowed to answer questions relating to Python or the class material.  All questions relating to this Final should be directed to your instructor, and posted on Piazza.  Posts on piazza should not contain any code.  Only questions meant to clarify the exam are allowed.  No debugging-related questions will be answered.  
 
<br />
 
<br />
The deadline for the exam is Friday,  '''May 8, at 4:00 p.m.'''   No extensions will be granted beyond this date and time.
+
The deadline for the exam is Friday,  ''May 8, at 4:00 p.m.''' While you are given 8 days on this exam, the programming should not take you more than a day, two at most, so organize your time well.  No extensions will be granted beyond the due date and time.
 
</bluebox>
 
</bluebox>
 
<br />
 
<br />
 
+
<onlydft>
 
=Problem 1=
 
=Problem 1=
 
<br />
 
<br />
Line 76: Line 75:
 
(if the video does not show in the page, you can watch it on YouTube: [https://www.youtube.com/watch?v=plgm_p2zAek https://www.youtube.com/watch?v=plgm_p2zAek])
 
(if the video does not show in the page, you can watch it on YouTube: [https://www.youtube.com/watch?v=plgm_p2zAek https://www.youtube.com/watch?v=plgm_p2zAek])
 
Your assignment is to write a program that uses graphics, and that implements the game illustrated in the video, with a few additional features.
 
Your assignment is to write a program that uses graphics, and that implements the game illustrated in the video, with a few additional features.
 +
<br />
 +
Note that the cars appearing on the left of the screen in the video, blink.  This is a side-effect of the graphics library, and not a voluntary feature of the program. 
 
<br />
 
<br />
 
==Frog==
 
==Frog==
 
<br />
 
<br />
 
[[Image:frog3.gif|right]]
 
[[Image:frog3.gif|right]]
You can use the frog image on the right for your game, or use one you will have found on the Web.  Or you can draw it using ovals and/or circles.  The URL for the image on the right is: [http://cs.smith.edu/dftwiki/images/f/f6/Frog3.gif cs.smith.edu/dftwiki/images/f/f6/Frog3.gif].
+
You can use the frog image shown on the right for your game, or use one you will have found on the Web.  Or you can draw it using ovals and/or circles.  The URL for the image on the right is: [http://cs.smith.edu/dftwiki/images/f/f6/Frog3.gif cs.smith.edu/dftwiki/images/f/f6/Frog3.gif].  If you use your own image, make sure you call it '''Frog3.gif'''.  When your program is tested, the Frog3.gif image shown here will be the one your program will find and use.
 
<br />
 
<br />
 
==The Banner==
 
==The Banner==
Line 163: Line 164:
  
 
<br />
 
<br />
 +
 
=Problem 3: Twitter=
 
=Problem 3: Twitter=
 
<br />
 
<br />
Line 215: Line 217:
 
<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 ''found'', 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 ''found'', and not simply output the dates shown above!
 +
* <font color="magenta">(Addition)</font>: The number of distinct locations is the number of different strings used to represent locations.  "Northampton, MA" is distinct from "Northampton MA".  "Northampton" is the same as "northampton". 
 +
* <font color="magenta">(Addition)</font>:  You are free to make an empty location count as a unique location or not.  So if the file contains 2 tweets, one with location "Northampton", and the other one with a blank location (only white space after the "Location: " string in the file), then that will count as either 1 or 2 distinct locations.  Both answers are correct.
 
* Note also that the date has been modified by the program, and is output as an 8-digit quantity; the year first, followed by the month, followed by the day.  Note also that April is represented by 04, and not 4.
 
* Note also that the date has been modified by the program, and is output as an 8-digit quantity; the year first, followed by the month, followed by the day.  Note also that April is represented by 04, and not 4.
 
<br />
 
<br />
 +
 
==Requirements==
 
==Requirements==
 
<br />
 
<br />
Line 231: Line 236:
 
* Test your program well.  In particular, your program should be able not to 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 not to 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 string 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.
+
* 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 string 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.  "Northampton " and "Northampton" are the same (because the stripped strings are the same)
 +
* <font color="magenta">(New addition)</font> When your program counts the number of tweets that match the "location of interest" selected by the user, it should look for ''partial'' matches in the location fields only.  For example, if the user writes "amherst" as her location of interest, then the program will count "Amherst, MA", "South Amherst, MA", "North-Amherst, MA" as matching her selection.
 
<br />
 
<br />
 +
 
==Submission==
 
==Submission==
 
<br />
 
<br />
 
* Submit your program in the Final Problem 3 section.
 
* Submit your program in the Final Problem 3 section.
 
<br />
 
<br />
 +
 
=Problem 4: Quiz=
 
=Problem 4: Quiz=
 
<br />
 
<br />
 
Answer the questions in the Quiz section of the Final Exam section, on Moodle.
 
Answer the questions in the Quiz section of the Final Exam section, on Moodle.
 
<br />
 
<br />
 +
</onlydft>
 
<br />
 
<br />
 
<br />
 
<br />
 
[[Category:CSC111]][[Category:Python]]
 
[[Category:CSC111]][[Category:Python]]
 
 
</onlydft>
 

Latest revision as of 17:22, 12 December 2015

This exam is a take-home exam given under the rules of the Smith College Honor-Code. Please make sure you read it and understand it.
The exam is open book, open notes, and open Web.
You have to do the work individually. You cannot seek help from anybody for this exam. The TAs will not have consulting hours, and will not be allowed to answer questions relating to Python or the class material. All questions relating to this Final should be directed to your instructor, and posted on Piazza. Posts on piazza should not contain any code. Only questions meant to clarify the exam are allowed. No debugging-related questions will be answered.
The deadline for the exam is Friday, May 8, at 4:00 p.m.' While you are given 8 days on this exam, the programming should not take you more than a day, two at most, so organize your time well. No extensions will be granted beyond the due date and time.



...