Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import turtle
- size = 20 # size of the smallest square
- def draw_multicolour_square(sz):
- """Make turtle t draw a multi-colour square of sz."""
- for i in ['red','purple','hotpink','blue']:
- turtle.color(i)
- turtle.forward(sz)
- turtle.left(90)
- for i in range(15):
- draw_multicolour_square(size)
- size = size + 10 # increase the size for next time
- turtle.forward(10) # move turtle along a little
- turtle.right(18) # and turn a little
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement