Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This function draws one square of the sidewalk
- def draw_square():
- for i in range(4):
- forward(50)
- left(90)
- # This function draw a line of squares calling the draw square
- # function and then turns Tracy
- def draw_sidewalk():
- pendown()
- for i in range(7):
- draw_square()
- forward(50)
- penup()
- forward(50)
- left(90)
- # Sets Tracy to the starting position and then calls the sidewalk function
- # 4 times for each side of the canvas.
- penup()
- setposition(-200,-200)
- for i in range(4):
- draw_sidewalk()
Advertisement
Add Comment
Please, Sign In to add comment