Assignment 1: Flags
Assigned: Thursday, 9 September
Due: Thursday, 16 September, 11:59 p.m.
Learning goals
- Navigate Pyret documentation
- Use the
images
library
Getting started
- Open code.pyret.org and ensure it's connected to your Google account.
- Make a new file named
asmt1.arr
.
Note: Assignments will be graded anonymously, so don't include your
name.
Help!
- You'll want to consult the Pyret documentation. It's accessible from CPO by clicking on the pirate button in the top left corner.
In particular, we recommend taking a look at the image documentation *before* working on this assignment!
- If you have any questions, please post on Campuswire. Don't post any code unless requested by the coaches or instructors, though.
- Your friendly coaches and instructors are also here to help with this assignment one-on-one, in person and on Zoom. Check your section's website for a schedule of office hours.
Assignment
Write code to generate four flags:
- Madagascar
- Turkey
- Jamaica
- Greenland
Set up your code so that the four flags are output in the interactions window (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. However, you should start familiarizing yourself with good Pyret style, which will be graded on future assignments.
Submit assignment
- Download your file (File → Download) and ensure it's named
asmt1.arr
.
Note: You can submit as many times as you want before the deadline. Only your latest submission will be graded.
Acknowledgments
This assignment is adapted from Kathi Fisler and colleagues at Brown University.