Due: Wednesday, June 26 at 9am (submit through this Google form – directions are at the bottom of the page)
To make sure you can write, run, and submit Pyret programs.
To give you practice writing code and breaking down problems into the collection of operations that Pyret provides.
To give you practice working with Pyret’s documentation.
Collaboration Policy: Collaborating with others on this assignment is fine. However, we strongly recommend that you type these out on your own and try doing at least a couple of them on your own. This assignment is building up core skills that you’ll need throughout the course.
Write Pyret programs to generate images of the following four national flags (you can find the flags online):
Madagascar
Turkey
Jamaica
Greenland
Set up your file so that when it is run, the four flags appear in the interactions window.
There are many more operators on images than what we have covered in class. To see the full list, go to the Pyret documentation. Under the "Builtins and Libraries" link on the left sidebar, look for the "image" library. That will give you a list of all the image operations. The list clusters operations by roughly what they do. So if you are looking for different ways to align images, look for an operation you know (like "overlay"), then see what other operations are nearby on the list.
- How accurate do our flag images need to be?
We want accuracy in the shapes that are present, their general location, and their general orientation. We do not care about exact positioning or size ratios. We do not care about the specific shade of colors (i.e., you can use "green" as the color name even though it produces a much brighter green than on some of these flags).
This is mostly a warmup assignment, to make sure everyone can get Pyret running and write some basic programs. We will visually inspect your flags to make sure they look roughly accurate (see anticipated question), and eyeball your code to look for areas in which to give you feedback. This assignment will not weigh heavily in final course grades.
Make sure you have included a collaboration statement as a comment at the top of your file. This statement should look something like:
# I have done this entire assignment on my own
or
# For the turkish flag, Jaime and I developed the code together
When you are done, download your file from Pyret (under the "File" menu), save it with the name flags.arr, and upload your file to this Google form
Here’s an animated-gif showing the steps in case you need them.