On this page:
7.1.1 Preface
7.1.2 Setup
7.1.3 Assignment
7.1.4 Built-Ins
7.1.5 Submission and Grading

7.1 Learning Pyret

7.1.1 Preface

The language of this course is Pyret. The textbook for the rest of the course is PAPL. The early chapters of the book provide a brief introduction to the language.

7.1.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.

7.1.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.

7.1.4 Built-Ins

Feel free to use these assignments to explore Pyret’s built-in functions. See the documentation for reference. You should try to do each exercise both with and without built-ins: the former makes you more facile with the libraries, but the latter makes sure you aren’t completely dependent on them.

7.1.5 Submission and Grading

You do not need to submit your work, nor will it be graded. Rather, if you want help or feedback, please go to Hours. Show us how far you’ve gotten and we’ll help you make progress form there.