-
Notifications
You must be signed in to change notification settings - Fork 0
/
gui5..py
32 lines (24 loc) · 673 Bytes
/
gui5..py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import turtle as t
import random
tim = t.Turtle()
t.colormode(255)
colours = ["CornflowerBlue", "DarkOrchid", "IndianRed", "DeepSkyBlue", "LightSeaGreen", "wheat", "SlateGray", "SeaGreen"]
directions = [0, 90, 180, 270]
t.pensize(2)
t.shape('turtle')
t.speed(0)
def making_colours():
r = random.randint(0,255)
g = random.randint(0,255)
b = random.randint(0,255)
color = (r, g , b)
return color
def speed(degree):
angle = int(360 / degree)
for _ in range(angle):
t.color(making_colours())
t.circle(100)
t.setheading(t.heading() + degree)
speed(5)
s = t.Screen()
t.exitonclick()