Learning Pyret
1 Preface
2 Setup
3 Assignment
4 Built-Ins
5 Handin Instructions
6 Grading

Learning Pyret

1 Preface

The language of this course is Pyret. The textbook for the rest of the course is PAPL. Chapter 2 of the book gives you an introduction to the language with a brief summary of the How to Design Programs methodology.

2 Setup

As a way to learn the basics of Pyret, we are asking you to implement and test certain functions. We strongly suggest that before you begin you start reading the course text’s chapter and look at the language tour, using the documentation for Pyret as needed. You will be writing your code online. We are not supporting any other usage modes.

To begin, please go to code.pyret.org and follow the instructions to connect your Brown Google drive.

Once connected, visit this link.

Save a copy to your Google Drive with an appropriate title.

3 Assignment

We are asking you to implement and test the functions outlined in the file. Fill in the code and test blocks with your own implementations and test cases. As you fill out test cases, click the “Run” button to compile and execute your code. Pyret will report on the functionality of your code and tests. When you are done with this assignment, all of your test cases should pass. Be sure to cover edge cases and be confident that your code works on any input.

4 Built-Ins

In this assignment, you may use only use builtin functions for Numbers, Strings, and Booleans (see the documentation for reference). You may not use functions from any other builtins or libraries.

5 Handin Instructions

You can hand in your code by sharing a copy of your work on code.pyret.org, and then submitting the link to your shared copy using the handin script. With your code open, click the share button at the top of the page, and click on “Share a New Copy” to generate a snapshot of your code at the current moment. Choose the shared copy you would like to submit and copy the url of the shared copy. In your terminal, run the command:

cs019-cpo-handin learning-pyret <shared copy url>

6 Grading

This first assignment will not be assigned a numeric grade. Instead, after submitting your work via the handin script, you will need to get checked off by a TA to receive credit for your work. In addition to normal listed hours, your TAs will be holding extra hours at the following times:

Friday 3pm - 5pm (Fishbowl): lmshea

Tuesday 3pm - 5pm (Fishbowl): chsanfor

Tuesday 5pm - 7pm (CIT 201): vkubala

Tuesday 7pm - 9pm (CIT 201): skortchm

Tuesday 7pm - 10pm (CIT 201): jissroff

To get checked off for this assignment, go to hours and go through your code with one of the TAs. The TAs will be reading your code carefully to determine compliance with the design recipe, exhaustiveness of tests, and structure and correctness of the implementation. Once the TA is satisfied, you will be checked off. If you fail to satisfy the TA, you will not get credit for the assignment.