Problem Set 6: More Python Turtle Graphics
Assigned: Sunday November 4, 2007
Due: Monday November 12, 2007
Points: 5
More Python and Turtle Graphics
- (5 Points) Write a python function tumble that accepts integers
height and width and which makes a rectangle of the specified
dimensions tumble from the left of the screen to the right. The rectangle
should start on the left-hand side of the turtle graphics window and at y
coordinate 0. It should then fall to the right "landing" on the y-axis 0. It
should then rise up and fall over again. This process should repeat a few
times.
Extra Credit (2 Points): Solve this problem without using the
forward or backward functions. Use the goto
function instead. Hint: you'll need Math.cos and
Math.sin.
Extra Credit (2 Points): Solve this problem recursively.
Note: You can get 4 points extra credit by doing both.
|
|