-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflower.py
93 lines (70 loc) · 1.56 KB
/
flower.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import turtle
window = turtle.Screen()
window.bgcolor('black')
window.title("Bunga Kerennn !!!!!")
galatic = turtle.Turtle()
galatic.speed(20)
galatic.color('white')
rotate=int(180)
def Circles(t,size):
for i in range(10):
t.circle(size)
size=size-4
def drawCircles(t,size,repeat):
for i in range (repeat):
Circles(t,size)
t.right(360/repeat)
drawCircles(galatic,150,10)
t1 = turtle.Turtle()
t1.speed(20)
t1.color('yellow')
rotate=int(90)
def Circles(t,size):
for i in range(4):
t.circle(size)
size=size-10
def drawCircles(t,size,repeat):
for i in range (repeat):
Circles(t,size)
t.right(360/repeat)
drawCircles(t1,130,10)
t2= turtle.Turtle()
t2.speed(20)
t2.color('blue')
rotate=int(80)
def Circles(t,size):
for i in range(4):
t.circle(size)
size=size-5
def drawCircles(t,size,repeat):
for i in range (repeat):
Circles(t,size)
t.right(360/repeat)
drawCircles(t2,110,10)
t3 = turtle.Turtle()
t3.speed(20)
t3.color('red')
rotate=int(90)
def Circles(t,size):
for i in range(4):
t.circle(size)
size=size-19
def drawCircles(t,size,repeat):
for i in range (repeat):
Circles(t,size)
t.right(360/repeat)
drawCircles(t3,80,10)
t4= turtle.Turtle()
t4.speed(20)
t4.color('green')
rotate=int(90)
def Circles(t,size):
for i in range(4):
t.circle(size)
size=size-20
def drawCircles(t,size,repeat):
for i in range (repeat):
Circles(t,size)
t.right(360/repeat)
drawCircles(t4,40,10)
turtle.done()