Homework 1: Flags
Due: Tuesday January 28, 2020 at 9:00PM EST.
Setup and Handin
Setup
- Set up code.pyret.org; this requires logging in with any Google account.
- Make a new file in code.pyret.org called
hw1-code.arr
.
- Include this at the top of your file (in the Definitions Window):
include image
Do not put your name anywhere in the file.
Handin
- Download your file (File > Download) and make sure it is called
hw1-code.arr
. Hand in your work on Gradescope, making sure to use your anonymous account.
- You may submit as many times as you want before the deadline. Only your latest submission will be graded.
- If you have any questions, please post on Campuswire.
Helpful Things
Documentation
This guide will help you get started with Pyret!
The Pyret Documentation is accessible from the Pirate button in the top left corner of code.pyret.org.
For this assignment, you will find the image documentation useful. We recommend briefly browsing this documentation before working on these problems!
Staff Assistance
Your friendly TAs and Professor are here to help with this assignment! You can find our schedule for office hours here.
What we will look for when grading
- We want accuracy in the shapes that are present, their general locations, sizes, and orientations.
- We do not care about exact positioning, size ratios, or angles.
- We do not care about specific color shades. For example, you can use
"green"
even though it produces a much brighter green than on some of these flags. If you want to be accurate, a comprehensive list of color names can be found here.
The Assignment
It’s a sticky Sunday afternoon in Nevada and Moses is tuckered out. He’s herded the cattle, polished his saddle, and whitewashed the ol’ fence. Despite his productivity, Moses is feeling awfully small in this big world of ours. To find some peace, Moses wants to learn a bit more about Earth’s cultures by looking at countries’ flags.
You will help Moses by writing code for four flags for this assignment:
- Madagascar
- Turkey
- Jamaica
- Greenland
Set up your code so that the four flags are output on the right hand side when we press the run button. Make sure nothing else is output (no sub-images, numbers, strings, or otherwise).
When you are done, download the file and submit it following the instructions above.
The Flags
Madagascar

Turkey

Jamaica

Greenland

Theme Song
Wavin’ Flag by K’NAAN
Brown University CSCI 0111 (Spring 2020)
Do you have feedback? Fill out this form.
Homework 1: Flags
Due: Tuesday January 28, 2020 at 9:00PM EST.
Setup and Handin
Setup
hw1-code.arr
.Handin
hw1-code.arr
. Hand in your work on Gradescope, making sure to use your anonymous account.Helpful Things
Documentation
This guide will help you get started with Pyret!
The Pyret Documentation is accessible from the Pirate button in the top left corner of code.pyret.org.
For this assignment, you will find the image documentation useful. We recommend briefly browsing this documentation before working on these problems!
Staff Assistance
Your friendly TAs and Professor are here to help with this assignment! You can find our schedule for office hours here.
What we will look for when grading
"green"
even though it produces a much brighter green than on some of these flags. If you want to be accurate, a comprehensive list of color names can be found here.The Assignment
It’s a sticky Sunday afternoon in Nevada and Moses is tuckered out. He’s herded the cattle, polished his saddle, and whitewashed the ol’ fence. Despite his productivity, Moses is feeling awfully small in this big world of ours. To find some peace, Moses wants to learn a bit more about Earth’s cultures by looking at countries’ flags.
You will help Moses by writing code for four flags for this assignment:
Set up your code so that the four flags are output on the right hand side when we press the run button. Make sure nothing else is output (no sub-images, numbers, strings, or otherwise).
When you are done, download the file and submit it following the instructions above.
The Flags
Madagascar

Turkey

Jamaica

Greenland

Theme Song
Wavin’ Flag by K’NAAN