Link Search Menu Expand Document (external link)

Exercise: Mock Homework Assignment

In this exercise, you will practice the homework assignment workflow for CAPP 30121 by cloning a GitHub repo generated by GitHub Classroom, updating the repo’s code to make sure that its functions pass a series of automated tests, and then all submitting your repository to Gradescope, where it will be automatically scored.

Setup

  1. Navigate to the GitHub Classroom invitation for the camp-3 assignment by clicking this link here.
  1. Join the classroom if prompted and then click “Next”.
  1. Click on the green “Accept this assignment” button and a new repository will be generated for you. Refresh the web page until you see confirmation that the assignment repository has been created. Then click on the URL in the blue box to be redirected to your individual repository.

Create GitHub Classroom repo for Python programming assignment

  1. Once you’re on your individual repository page, click on the green dropdown button with the word “Code” and copy the repository address in the SSH tab by clicking on the icon with two squares.

View repo for Python programmming assignment repo

View SSH icon for Python programmming assignment repo

  1. In your remote terminal, change to the capp30121 directory. Run the command: git clone <REPOSITORY_ADDRESS>, where <REPOSITORY_ADDRESS> is the address that you just copied. For example, in my terminal, I would run git clone git@github.com:uchicago-CAPP30121-aut-2022/camp-3-LaunaG.git.

Clone repo for Python programming assignment on terminal

  1. Confirm that the repository has been cloned successfully by running ls. You should see a folder called camp-3-<YOUR_GITHUB_USERNAME>, where <YOUR_GITHUB_USERNAME> is your personal GitHub username.
  1. We will be using VS Code’s file explorer to more easily open and view files. Click on the “Open Folder” link in the “Get Started” file that is displayed in the Editor window. If you don’t see a file called “Get Started”, you can also go to “File > Open File” from the menu bar. Then click on the name of your folder, capp-3-<YOUR_GITHUB_USERNAME>, from the dropdown and hit the button “Ok”.

Open folder for Python programming assignment

  1. VS Code will then launch a new window open to your assignment directory, while still connected to the remote server through SSH. If you don’t see the directory contents displayed on the lefthand side of the screen, click the “File Explorer” button (a stack of papers) in the Activity Bar to toggle the “File Explorer” open.

View folder for Python programming assignment

Coding

You should always locate and carefully read through the instructions before beginning an assignment. For CAPP 30121, instructions will typically be located in a file called “README” and/or at the top of an assignment itself within the file’s docstring.

Click on the file README.md to open it in the Editor window. Read through the instructions and then open the file practice.py. Complete the functions there, testing your code using IPython, pytest, and pylint commands as described by the README.

When you are done coding, make sure to add, commit, and push all of your changes to GitHub.

Submitting Your Code on Gradescope

  1. Check your email for an invitation from Gradescope. The invitation will contain a link that allows you to create an account and set a username and password if you have never used Gradescope before. If you already have a Gradescope account, you can use that link to log into the course.
  1. After logging in, you’ll be taken to your Dashboard. Select the course “CAPP 30121 2,1 Computer Science with Applications 1”. You’ll then see the list of assignments that you can start. Click on “CAPP Camp - Python Programming Practice” and then click the radio button for submitting your code using GitHub. Authorize Gradescope to use GitHub, and then select the name of your repo (capp-3-YOUR_GITHUB_USERNAME) and branch (main), and hit the button to submit/upload your code.

Submit Python programming assignment on Gradescope

  1. Following submission, an autograder will automatically begin running tests against your code to generate a score. In CAPP 30121, your homework assignment score will based on both “Completeness”–how many tests you pass correctly–as well as additional coding style and syntax errors that the autograder might not catch. Style and syntax criteria will be manually graded by your instructor and TAs.

View Gradescope autograder results

  1. Check out your score. If you missed points, try fixing and testing your code again, pushing your new changes to GitHub, and then resubmitting the assignment.

Advanced Resources