Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import turtle as t
- import random
- from turtle import Screen
- timmy = t.Turtle()
- t.colormode(255)
- def random_color():
- r = random.randint(0, 255)
- g = random.randint(0, 255)
- b = random.randint(0, 255)
- color = (r, g, b)
- return color
- def circles(width_):
- for i in range(5):
- heading = 360 / width_
- timmy.color(random_color())
- timmy.circle(100)
- timmy.setheading(timmy.heading() + heading)
- circles(5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement