6 Placement 1
6.1 Language and Software
For the placement process, you will be using the Racket programming language. Follow the link to download Racket. Installing it will also install the DrRacket programming environment, in which you can write and run your programs. The first part of the reading (see below) explains how to use DrRacket.
For the following assignment, you must use Racket’s Beginning Student language. Go to the Language menu, select Choose Language, and pick the language from the Teaching Languages section.What are these languages? Racket is a large, complex, industrial language. Therefore, we have defined small, clean sub-languages of Racket for the purposes of teaching. You will be programming in these small languages, not in the huge Racket language, which has several features that may take a long time to understand if you stumble upon them (sometimes even through a typo).
6.2 Questions
If you have questions, use EdStem (see Registration).
You will be goverened by the Brown Academic Code.
If you have prior programming experience, you may find this assignment quite easy. That’s because the assignments are designed so even students who haven’t had access to a computing course before can still have a fair shot at trying out. The assignments will grow in complexity, so you may well find yourself wanting to use Campuswire later.
6.3 Library
(require 2htdp/image)
6.4 Reading
Read the Prologue of HtDP 2/e. You won’t need all the content of this part to do the work below (the first portion, through the “Arithmetic and Arithmetic” section, should suffice), but from the next assignment onward you will be defining functions and using conditionals (covered in the rest of the part), so you may find it useful read ahead.
If you want to learn more about Racket’s support for images, see the Quick Introduction.
If you are new to programming: people learn programming by actually writing programs and running them. As you read, type in the code in the document, see how it works, change it a little and see what happens. Actually trying the code in the assigned reading will be essential for you to get comfortable with the material. Do not passively “read” the material: you will get far less out of it than you imagine!
6.5 Task
Vietnam
Chile
Suriname
Saint Lucia
Turkey
You should create these flag images using the Racket image primitives (for rectangles, stars, etc.), not by finding the images and pasting them in. You are, however, welcome to use a Web search to figure out what the flags look like.
You may pick the dimensions of your flag, but please make it large enough for us to see (with a width of at least 100), but preferably not so large that we need to scroll a lot to see them all.
For maybe the only time this summer or during the semester, we will not judge you on absolute correctness (e.g., checking whether you got the precise ratios of the different parts right). We’re going to visually eyeball it for general adherence. Of course, feel free to geek out on the vexillological details as much as you wish!
6.6 Grading Standards
This assignment will not be graded. You’ll know when you’ve gotten the flags right; you don’t need us to tell you. Also, for some of you this may interfere with the end of the school year, and we don’t want to put extra pressure on you.
However, we still want you to turn in your work so that you have gone through the full cycle of submission. That way things will go more smoothly from the next assignment onward.
Therefore, please do turn in your work but please do not expect any feedback on this assignment.
6.7 Turnin
Please write a series of expressions in a single file such that, when the file is Run, the flags appear in the interactions area. If you do use define to give them names, make sure to use these names so that the criterion above is met.
Be sure to read and follow the instructions in Placement AFQ and Anticipated Frequent Questions as well (e.g., note the requirement of anonymity) for this and all subsequent assignments.
Please name your file p1.rkt (“papa-one-dot-romeo-kilo-tango”). Failure to use the correct name or otherwise follow these instructions may result in zero credit.
Instructions on how to upload your solution will be posted to EdStem.