12.4 Placement 1
On this page:
12.4.1 Language and Software
12.4.2 Questions
12.4.3 Library
12.4.4 Reading
12.4.5 Task
12.4.6 Grading Standards
12.4.7 Turnin

12.4 Placement 1

    12.4.1 Language and Software

    12.4.2 Questions

    12.4.3 Library

    12.4.4 Reading

    12.4.5 Task

    12.4.6 Grading Standards

    12.4.7 Turnin

12.4.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.

12.4.2 Questions

If you have questions, use Campuswire (see How to Contact Us).

Please do not post answers or ask questions in a way that reveals your answers (for this and all future assignments). Read the policy on Honesty and Sharing: you’re responsible for adhering to it.

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.

12.4.3 Library

To do these assignments, make sure you add the following line at the top of your program:
(require 2htdp/image)

12.4.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!

12.4.5 Task

Create flags of the following countries:
  • 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!

12.4.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.

12.4.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. (Note: Google Drive will automatically rename your file(s) to include your name. This is fine.)

Upload your file here. You will need to be logged into the Google@Brown domain to upload: it will not work with a regular Google (…@gmail.com) account.