2500 F '12
The Hand In
Set 1
Set 2
Set 3
Set 3h
Set 4
Set 4h
Set 5
Set 5h
Set 6
Set 6h
Set 7
Set 7h
Set 8
Set 9
Set 8h
Set 10
Set 9h
Set 11
Set 12
Set 10h

Problem Set 2

Due date: 9/17 @ 8:00pm

The goal of this problem set is to practice writing 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, 4.4.4, 5.1.2
Problem A1
Formulate the formulas from Problems 2 and 3 on Set 1 as BSL programs. Then apply the strategy of HtDP problem 4.2.4 to formulate automatic tests for these two programs (using check-expect instead of =). 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 Sun Dec 2 14:52:34 EST 2012generated with Racket