Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tommy = Turtle()
- def random_rectangles(name, color,pensize, x, y):
- name.color(color)
- name.pensize(pensize)
- name.goto(x, y)
- name.pendown
- name.forward(100)
- name.right(90)
- name.forward(150)
- name.right(90)
- name.forward(100)
- name.right(90)
- name.forward(150)
- name.pendown
- random_rectangles(tommy,'green',10, 0, 0)
- random_rectangles(tommy,'cyan',5, 15, 0)
- random_rectangles(tommy,'magenta',15, 100, 0)
- random_rectangles(tommy,'purple',10, -50, 45)
- random_rectangles(tommy,'purple', 15,-60, 70)
- random_rectangles(tommy,'red',20, 30, 20)
- random_rectangles(tommy,'yellow',10, -45, -57)
- random_rectangles(tommy,'blue',8, -16, 39)
- random_rectangles(tommy,'purple',2, -16, 39)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement