Lab 1 - Using Jupyter Notebooks and Workflow for turning in Assignments#

In this class we will be using Jupyter Notebooks for completing homework and lab assignments. This lab assignment will make sure you are comfortable using these tools.

Jupyter notebooks are Java-Script Object Notation files that allow you to create documents to move and transport code and documentation that can be run interactively. The postfix for the file is .ipynb; you can think of this like a word document for python.

In this lab assignment, we want you to demonstrate your proficiency using this system. We will provide you some code that allows you to create your own personalized T-shirt logo.

Part 0: Instructions for Assignments in the Course#

Computers work by following instructions exactly. Even the smallest of mistakes can cause a computer program not to work entirely. In this class we will expect that all of your work follows instructions exactly. We will provide many ways for you to check that you have not made a simple mistake in your assignments; however, just like a computer program if you do not follow instructions exactly, you may not receive credit for your work. It is important that you read and understand all instructions for all assignments.

Regrades and resubmissions will only be considered if there was an error in the submission or grading process. If instructions are not exactly followed, this is not a valid reason for a regrade or resubmission.

Quiz and Test Taking#

For quizzes and tests, you will be required to record your quiz and exam to ensure you are using only allowed resources. We will be using a monitoring software. For each assignment where monitoring is required, you will be provided with a special link to access the assignment. You will be required to open this link in Google Chrome - other web browsers (specifically, Safari are not supported). You can download Google Chrome here.

You will be required to share your entire screen and record yourself on video. If you do not have a webcam, you will be required to purchase one. To receive credit for monitored assignments, you will be required to start the recording before you open the assignment and end the recording after you have submitted the assignment on GitHub classroom.

Starting Your Assignment#

Warning

Wise is only tested on Google Chrome, and likely will not work on other browsers. Please use Google Chrome for all assignments.

Click this link to start your assignment

This will prompt you to login to our proctoring service.

Part 1: Login in to the Proctoring Service:#

  1. Click the link above.

  2. Login with your Drexel email and Drexel Student ID (e.g., abc123).

  1. Starting Recording

You need to make sure your Google Chrome web browser is allowed to access your camera and microphone. You will be prompted to allow this. Then, you must share your entire screen and agree to the terms.

Note

Some browsers including Safari do not support screen sharing. Wise is tested on Google Chrome a free web browser. You can download Google Chrome here.

  1. Accept the permissions for screen capture and recording.

  1. Take a picture of yourself using your webcam, which is used to verify your identity.

  1. You will be presented with a link to begin your assignment. Click this link, and you will be redirect to your JupyterHub with the assignment loaded.

Part 2: Entering Your Information for Credit#

To receive credit for assignments it is important that we can identify your work from others. To do this, we will ask you to enter your information in the following code block.

Before you begin#

Run this block of code that imports and sets up the autograder. This will allow you to check your work.

# Initialize Otter
import otter
grader = otter.Notebook("lab_1-assignment-workflow.ipynb")
# Please provide your first name, last name, Drexel ID (e.g., abc123), and Drexel email. Make sure these are provided as strings. 
# "STRINGS ARE TEXT ENCLOSED IN QUOTATION MARKS."

# In the assignments, you will see sections of code that you need to fill in that are marked with ... (three dots). Replace the ... with your code.
import random
first_name = ...
last_name = ...
drexel_id = ...
drexel_email = ...
grader.check("q0-Your-Name")

Part 4: Submitting Your Assignment#

Due to the size of the class, we will be using an automatic grading system. Upon submission, your assignment will be graded, and a score file will appear in your git repository. This score file will tell you if you have passed all of the tests. If you have not passed all of the tests, you can resubmit your assignment as many times as you would like before the due date. Assignments will not be accepted after the due date unless prior arrangements have been made with the instructors.

  1. Saving your file:

Press command + s to save your file. You can also go to file and select save and checkpoint.

  1. Downloading and renaming your file:

Go to file and select download. This will download your file to your local computer.

Please name your files YOURDREXELUSERNAME_HW1.ipynb and YOURDREXELUSERNAME_image.png, where you replace β€œYOURDREXELUSERNAME” with your actual Drexel username (e.g., abc123).

  1. Navigate to GitHub Classroom

Use this link to navigate to the assignment on GitHub classroom.

  1. Login/create an account

If you already have a GitHub account, you can login. If you do not have a GitHub account, you will need to create one by clicking create a new account.

4.1 Create an account with a strong password

4.2 Verify your email address

4.3 Return to the assignment on GitHub classroom

If you had to create an account you likely need to go back to GitHub classroom. You can do this by clicking this link again.

  1. Joining the Classroom

You will be prompted to join the classroom. Find your Drexel username to link your username to your GitHub account.

If for some reason your ID is not found click skip to the next step.

  1. Accepting the assignment

Click accept this assignment to accept the assignment.

  1. Making your repository

GitHub will now make a repository for you to submit your assignment. You need to hit refresh to monitor the progress. When the repository is ready you will see a screen like this:

Click the link to your repository.

  1. Uploading your files

In the top right corner, you will see a button that says Add file. Click this button and select Upload files. You will then be prompted to upload your files. You can drag and drop your files into the box or select choose your files to select your files.

  1. Committing your files

In GitHub, uploading is called committing. This means that the files are saved and tracked by your repository. You can commit your files by scrolling to the bottom of the page and clicking commit changes. Make sure that you are uploading the correct file with a .ipynb extension.

  1. Autograding

Once you submit your file, the autograder will run. You will notice a small yellow dot next to the repository name after refreshing. If you click on the yellow dot, you can see the progress of the autograder. This will take a few minutes to complete. Once complete, this will change to a checkmark.

  1. Viewing your score

Each .ipynb file you have uploaded will have a file with the name of your file + Grade_Report.md. You can view this file by clicking on the file name. This will show you the results of the autograder.

We have both public and hidden tests. You will be able to see the score of both tests, but not the specific details of why the test passed or failed.

Note

In python and particularly jupyter notebooks it is common that during testing you run cells in a different order, or run cells and modify them. This can cause there to be local variables needed for your solution that would not be recreated on running your code again from scratch. Your assignment will be graded based on running your code from scratch. This means before you submit your assignment you should restart the kernel and run all cells. You can do this by clicking Kernel and selecting Restart and Run All. If you code does not run as expected after restarting the kernel and running all cells it means you have an error in your code.

Fin#