Teaching
211 F '08
 
Assignments
The Hand In
The Recipes
The World
Set 1
Set 2
Set 3
Set 4
Set 5
Set 6

Problem Set 2

Due date: 9/22 @ 8pm


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 Scheme programs. Then apply the strategy of HtDP problem 4.2.4 to formulate automatic tests for these three 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 Mon Oct 13 21:39:53 EDT 2008generated with PLT Scheme