Problem Set 5: Basic Python and Turtle Graphics
Assigned: Wednesday October 24, 2007
Due: Monday October 29, 2007
Points: 9
Basic Turtle Graphics
- (3 Points) Write a python function rightTriangle that accepts x and
y coordinates, a height and width and draws a right triangle. For example,
a call such as rightTriangle(0,0,200,100) should draw a picture like the
following:
- (3 Points) Write a python function cube that accepts x and
y coordinates, a height, width and depth and draws a 3-D cube. For example,
a call such as cube(0,0,100,100,50) should draw a picture like the
following:
- (3 Points) Write a python function starOfDavid that accepts x and
y coordinates and a side length and draws a Star of David. For example,
a call such as starOfDavid(0,0,100) should draw a picture like the
following:
|
|