CS21 Lab 5: More Functions

Due 11:59pm Tuesday, February 26, 2008

The goal of this assignment is to continue practicing with functions. However, for this assignment you will need to decide for yourself how to break up the problem into reasonable functions. Remember that two key benefits of functions are that they reduce code duplication and create reusable modules.

You will use the graphics library to construct a program that animates two related stick figures by alternately drawing, undrawing, and moving the two figures. This will create a more interesting style of movement than we have seen previously. For example, the first stick figure could be drawn with arms and legs pointing down. The second stick figure could be drawn with arms pointing up and legs pointing out. This will create an animation that appears to do jumping jacks across the graphics window.

A skeleton version of the program, called stickFigures.py will appear when you run update21 in a terminal window. The program handin21 will only submit files in this directory.

You may work with a partner on this assignment. If you choose to do this, be sure to put both names at the top of your file. Only one student needs to turn in the solution using handin21.



Once you are satisfied with your program, hand it in by typing handin21 in a terminal window. Remember, if you are working with a partner, only one of you needs to turn in the program.