Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import turtle
- elena=turtle.Turtle()
- elena.shape('circle')
- elena.color('blue')
- elena.penup()
- elena.goto(-60,-120)
- elena.write("Let's make 4 rectangles!")
- elena.goto(0,50)
- elena.pendown()
- def rectangle():
- elena.begin_fill()
- elena.left(0)
- elena.forward(130)
- elena.left(90)
- elena.forward(90)
- elena.left(90)
- elena.forward(130)
- elena.left(90)
- elena.forward(90)
- elena.end_fill()
- rectangle()
- elena.color('green')
- rectangle()
- elena.color('red')
- rectangle()
- elena.color('yellow')
- rectangle()
Advertisement
Add Comment
Please, Sign In to add comment