Lab 1 - Spring 2021

The main purpose of this initial laboratory exercise is to acquaint you with

  • GitHub,
  • the DrRacket IDE, and
  • the procedure for submitting your work using GitHub.

You will edit and run your first program from DrRacket. The program itself will be starter code pulled from GitHub, containing a variety of expressions (numeric, string, boolean, and graphical), because the goal of this lab is to learn to create, run, and submit your work electronically for grading.

Create your GitHub account

  1. Point your browser to

  2. Create your github account
    1. use your Vassar email (minus the as your GitHub username
      1. it is possible your Vassar username is already taken by an existing github user
      2. if this is the case, append -vassar to your username (or some other suffix that makes it unique)
    2. use a strong password (but be sure you remember your password)
    3. use your Vassar email address as the email address for your GitHub account

  3. Open up a new tab in your browser and copy/paste this URL:
    1. Login to Github
      1. you will be prompted to join the classroom roster (select your name from the list)
      2. you will be prompted to accept this assignment
      3. your assignment repository will be created for you by GitHub Classroom
      4. you will be prompted to refresh the page to see when it is finished creating your assignment
    2. Note: this will create your own copy of Lab 1 for you to work on
      1. you will see the URL (link) to your repository. it will be of the form:
      2. but it's not on your computer yet
      3. it's still just in the GitHub Cloud

  4. Create a folder on your computer's Desktop (or wherever is most convenient for your to find it). I recommend naming it cs101.

  5. Download a copy of your Lab 1 repository
    1. in your GitHub browser tab, you'll see a green button labeled with a downward facing arrow and the word “Code”. click on that button and a dropdown dialog title “Clone” will appear.
    2. from the “Clone” dialog, be sure the “HTTPS” tab is selected (underlined in red) and click on the “Download ZIP” option. Save the .zip file.
    3. if necessary, move the .zip file from your downloads folder to your cs101 folder on your Desktop.
    4. unzip the file
      1. if you're on a Mac you can double-click on it
      2. if you're on Windows you can right-click on it and select “Extract All”
      3. a file named lab1.rkt should be in the folder that was extracted from the .zip file.

  6. Launch DrRacket. When DrRacket loads, you will be presented with a window that is divided into two main frames: the definitions window (top half) and the interactions window (bottom half).

  7. From the Language menu along DrRacket's menu bar, select Choose Language…. In the left column, make sure the arrow head to the left of How to Design Programs is pointing downwards. If the arrow is not pointing downwards, click on it. This will cause a list of language levels to appear. Click on Beginning Student Language. Click the OK button bottom right to save this selection.

  8. To make BSL your default language, click on the Run button at the top of the screen. The interactions window will display the lines shown below:

Welcome to DrRacket, version 8.0 [cs].
Language: Beginning Student; memory limit: 256 MB.

Now you are ready to begin programming! Note that you will need to follow steps 7-8 when setting up DrRacket on your own computer, too.

Your first program

  1. Open the lab1.rkt file in DrRacket by clicking on the File menu option and selecting Open. Then navigate to your cs101/lab1 directory, and double-click on lab1.rkt.

  2. Fill in your name where <YOUR NAME> appears in the comments at the top of the program.

  3. Run your program by clicking the Run button.

  4. If there is a syntax error somewhere in your code, DrRacket will generate a syntax error. To see what a syntax error looks like, remove the right parentheses from the end of one of the expressions (a line that does not start with ;) and click the Run button. Notice how the error message appears in a red font in the interactions pane.

  5. We encourage you to experiment with this program. The comments describe what the expressions do, so read carefully, then play around by changing the expressions, save, and re-run. See if you get the results you expect. Be daring! In the worst case, you can always start over with a fresh copy.

  6. When your program successfully runs, show it to your lab instructor or one of the lab coaches and follow the submit procedure detailed below.

Submitting your work

Now is the time when you want to upload the revised version of the lab1.rkt file to your repository. This involves “committing” and “pushing” your changes to your Lab 1 GitHub repository.

  1. From your GitHub browser tab, click on the “Add file” button immediately to the left of the “Code” button you used to download the ZIP file of your repository.
  2. From the dropdown menu for “Add file”, select “Upload files”
  3. You should now see a region of the webpage with instructions to “Drag files here to add them to your repository” or a link to “choose your files”
    1. it's your choice! you can either drag the lab1.rkt“ file onto the region of the browser tab, or - click on “choose your files” and select lab1.rkt” from the file chooser.
    2. you should see the file lab1.rkt listed just below the drag-and-drop region of the screen.
  4. Next you need to provide a commit message under the “Commit changes” portion of the page. In the textbox with the default prompt to “Add files via upload” you should type in “finished lab 1”
  5. Without changing anything else, click the green “Commit changes” button.
    1. it will take a brief moment to process your file (with a message telling you that)
    2. then you will see the lab1.rkt file listed with the commit message you provided (finished lab 1), and an indication the file was updated just now.


You completed your first lab! You created a GitHub repository when you accepted your assignment. You cloned it when you downloaded it to your computer. You opened the lab1.rkt file in DrRacket, and experimented with running and modifying the code. Finally, you updated your repository when you uploaded your revised lab1.rkt file by clicking and dragging it onto the browser tab for your repository (in git terminology, you committed and pushed your changes).