Assignment 1: Fun with Flags
Assigned: Thursday, 1 September
Due: Wednesday, 7 September, 11:59 p.m.
Learning goals
- Navigate Pyret documentation
- Work with Pyret image operators to compose expressions
Getting started
Open code.pyret.org (CPO) and ensure it’s connected to your
vassar.edu
Google account.Make a new file named
asmt01.arr
.
Note: We’ll grade the assignments anonymously, so please don’t include your name anywhere.
Help!
This guide will help you get started with Pyret!
You’ll want to consult the Pyret documentation. It’s accessible from CPO by clicking on the pirate button. (That’s Bonny, named after pirate Anne Bonny.)
In particular, we recommend at least quickly browsing through the
image
documentation before you start working on this assignment!Your friendly coaches and instructors are also here to help with this assignment one-on-one. Check the schedule of student coaching hours and your instructor’s office hours.
Assignment
Write code to generate these three flags:
Set up your code so that the three flags are output in the interactions pane (on the right) when we press the Run button. Make sure nothing else is output (no sub-images, numbers, strings, or otherwise).
Grading criteria
When we grade the assignments, we will be looking for accuracy in
- the shapes that are present,
- their general locations,
- sizes, and
- orientations.
We do not care about
- exact positioning,
- exact size ratios,
- borders,
- exact angles, or
- precise color shades.
For instance, you can use "green"
as the color name even though it produces a brighter green than on these flags. If you want to be more accurate, a comprehensive list of the color names Pyret understands can be found here.
For this assignment, we won’t be grading on style (but we will on future assignments!)
Submitting the assignment
Download your file (File → Download) and ensure it’s named
asmt01.arr
.Upload your assignment on Gradescope.
Note: You can submit as many times as you want before the deadline. Only your latest submission will be graded.
Challenge exercises
The following won't be graded, but if you want to test your flag-making abilities, we recommend trying:
These are more challenging than they look!
Acknowledgments
This assignment is adapted from Kathi Fisler and colleagues at Brown University.