Teaching
211 F '07
 
Assignments
The Hand In
The Recipes
The World
Set 1
Set 2
Set 3
Set 4
Set 5
Set 6
Set 7
Set 8
Set 9
Set 10
Set X1

Problem Set 2

Due date: 9/17 @ 6pm


The goal of this problem set is to practice the design recipe for simple functions. The functions consume atomic forms of data (numbers, symbols, images). Some use conditionals to distinguish among different situations.


HtDP Problems
4.2.1, 4.4.1, 5.1.2
Problem A1
Formulate the formulas from Problems 2, 3, and 4 on Set 1 as Scheme programs. Then apply the strategy of HtDP problem 4.2.4 to formulate automatic tests for these three programs. Make sure to turn at least two examples from your table into tests.
Problem A2
Find an image of a spaceship on the web. Then develop a program that "flies" the spaceship on a 200 x 500 canvas from bottom to top. When the ship's top end reaches the top margin, make the ship re-appear on the bottom.

Your program should clearly identify at what speed the spaceship moves and a single change to your program should change the speed of the ship.


last updated on Mon Nov 19 01:21:50 EST 2007generated with PLT Scheme