PROGRAMMING GRAPHICS ACTIVITY TWO

NOTE: At WHS, make sure the platform says: Windows 95/98/NT/2000 x86, standard archive

Select the destination directory. Make sure the destination is as follows:
C:\Program Files\PLT.  The computer will then install the program.
Note:  Answer yes to all dialog boxes.

Add a shortcut on the desktop to DrScheme.  If you do not know how, ask.

Click on the Icon on the desktop to enter The World of DrScheme.  Take the tour.  When you are done you are ready to begin programming.

The (open … close) dance <ask teacher>

ARITHMETIC ACTIVITIES - See the Arithmetic Expression handout in your binder.

 In the interaction window (bottom window) see if you can write a command to ADD 3 and 4.    Remember the rule from the "dance" is (operation data data …).  The basic math operations are:  + to ADD - to SUBTRACT * to MULTIPLY / to DIVIDE =, >, < are the relational operators to compare numbers. Using the handout for ideas, try some more arithmetic expressions.  To learn more go to: www.knorth.info MATH Link. NOTE:  The interaction window can be use as a calculator when you need arithmetic to design and plan your graphics using patterns.

ENHANCEMENT 1:  Write functions for F(X) = X + 5, as well as others (ask for help).

ENHANCEMENT 2:  Play Ping-Pong.

1. Go to Language / Add TeachPack/ Open Htdp folder, select pingp-play.ss
2. In the definition window (top) type (go 'Programmer) and click the execute button.
3. You will see a canvas pop up.  Follow directions to play Ping-Pong.
4. To make the game more interesting you can change the speed and the vector of the ball.  Change the parameter that is a number to see what happens.  Use the following code.  The function calls to change-speed and change-wind must be written before the command go. Type the following in the top definition window, they click Execute.
 (change-speed 400)   (change-wind 400)   (go 'programmer)

 TSHome A1 A3 A4 A5 Notes