Assignment 3


Due Date: Monday, October 23 at 11:59 PM


Late Policy: All assignments and projects are due at 11:59pm on the due date. Each assignment and project may be turned in up to 24 hours late for a 10% penalty and up to 48 hours late for a 30% penalty. No assignments or projects will be accepted more than 48 hours late. Students have four free late days they may use to turn in work late with no penalty: four 24-hour periods, no pro-rating. This late policy is enforced without exception.

Honor Code: Under the Honor Code at Stanford, you are expected to submit your own original work for assignments, projects, and exams. On many occasions when working on assignments or projects (but never exams!) it is useful to ask others -- the instructor, the TAs, or other students -- for hints, or to talk generally about aspects of the assignment. Such activity is both acceptable and encouraged, but you must indicate on all submitted work any assistance that you received. Any assistance received that is not given proper citation will be considered a violation of the Honor Code. In any event, you are responsible for understanding, writing up, and being able to explain all work that you submit. The course staff will pursue aggressively all suspected cases of Honor Code violations, and they will be handled through official University channels.


This assignment includes a familiar dataset from past assignments as well as a new one. All of the data files are included in our assignment repo.

Setup Instructions:

We will be using Instabase again, as we did for Assignment 2.

  1. You will need the files found at the following link copied to your personal Instabase account: Assignment 3. To copy files to your personal Instabase account, click on the drop-down menu above the folder listing, choose Select All, then click on the Copy link that appears. You should now have a private copy of the assignment to work on.
  2. Navigate to the repository where you copied the files to, and the folder should contain assignment3.ipynb. Right-click or control-click on this file and select Open With > Jupyter. (If you simply double-click on it, it will show you the file but will not run Jupyter notebooks.) Sometimes it will take a minute or so for a new Jupyter server to start up on your behalf. Once it does, you are ready to go! In the notebook you will see clearly where you need to add code for the different steps of each problem.

Submission Instructions:

As we did for Assignment 2, we ask that you submit both a PDF of the Notebook through Gradescope and a copy of the Notebook through Instabase. We're requiring these steps so that we can both run your code and provide feedback (Instabase currently does not have the infrastructure to support instructor feedback on assignments).

Submitting through Gradescope

  1. Important: this is slightly different from what we asked you to do in the previous assignment. Download your Jupyter Notebook as a PDF, in print preview mode. With your Notebook pulled up in Instabase, press command-P for Mac, or ctrl-P for Windows, and save and submit a PDF version of the print preview. In Chrome, you can do this by changing the "Destination" as "Save as PDF" under "Local Destinations". Check that each of your answers is still there.
  2. Log into the Gradescope website ( using your Stanford email address. The TAs have already set up an account for you if you have not used Gradescope before.
  3. Click on the CS 102 class and click on Assignment 3.
  4. Upload your PDF and tag the pages corresponding to each question. You may submit as many times as you like before the submission deadline, and we will use your latest submission both for grading and for the late policy.

For more detailed instructions on submitting homework, take a look at the Gradescope FAQ.

Submitting through Instabase

Submitting through Instabase should be incredibly easy! At the bottom of each assignment, you will find a submission link and instructions. Please keep in mind that submissions are timestamped.