Assignment 3 - Python

Logistics

Due Date: Monday, May 7 at 11:59 PM

NOTE: Only one late day is allowed for this assignment! Submit by Tuesday, May 8 at 11:59PM.

Policies

Late Policy: All assignments and projects are due at 11:59pm on the due date. This assignment can be turned in up to one day late for a 10% penalty. 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.

Datasets:

This assignment uses the same datasets from past assignments (World Cup and Titanic). See setup instructions below.

Setup Instructions:

We will be using Instabase for this assignment.

  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. Copy to a folder in your own repository. You should now have a private copy of the assignment to work on.
  2. Navigate to the folder where you copied the files to, and the folder should contain PythonAssign.ipynb. Right-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 problems.

Submission Instructions:

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). Include your Instabase ID on the first page of your Gradescope PDF submission!

Submitting through Gradescope

  1. Important: this is slightly different from what we asked you to do previously. Download your Jupyter notebook as a PDF, in print preview mode. With your notebook pulled up in Instabase, press Command-P for Mac, or Control-P for Windows, and save and submit a PDF 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.
    If you have trouble downloading in print preview mode, download the notebook as HTML, then convert the HTML to a PDF using your browser or an online converter.
  2. Add your Instabase ID on the first page of your PDF. You can insert a page at the beginning, annotate on the first page, or insert a visible comment in Jupyter.
  3. Log into the Gradescope website (gradescope.com) using your Stanford email address.
  4. Click on the CS 102 class and click on Assignment 3.
  5. 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 the late policy.

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

Submitting through Instabase

Please submit your Jupyter notebook at this link.



Python

Complete the problems in PythonAssign.ipynb. Please follow the setup instructions above to create your own copy of the assignment. Make sure that the data (Players.csv, Teams.csv, Titanic.csv) is in the same folder as the notebook.