Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from turtle import Turtle, Screen
- import random
- timmy = Turtle()
- timmy.shape("arrow")
- timmy.color("black")
- colors = ["red", "green", "yellow", "blue", "purple", "magenta", "lime", "gold", "navy", "deep sky blue"]
- def draw_shape(num_sides):
- angel = 360 / num_sides
- for i in range(num_sides):
- timmy.forward(100)
- timmy.right(angel)
- for shape_sides in range(3, 11):
- timmy.color(random.choice(colors))
- draw_shape(shape_sides)
- screen = Screen()
- screen.exitonclick()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement