forked from abhishekdoifode1/Hacktoberfest2021
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDrawFlowerPython.py
More file actions
108 lines (79 loc) · 1.44 KB
/
DrawFlowerPython.py
File metadata and controls
108 lines (79 loc) · 1.44 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import turtle
def Batang():
Angle = 30
for i in range(10):
Titik.right(Angle)
Titik.forward(20)
Angle -= 5
def Balik():
Angle = 30
for i in range(10):
Titik.right(Angle)
Titik.backward(20)
Angle -= 5
def Batang2():
Angle = -50
for i in range(13):
Titik.right(Angle)
Titik.forward(-20)
Angle =- 5
def Batang3():
Angle = -45
for i in range(21):
Titik.right(Angle)
Titik.forward(-20)
Angle =- 5
def Daun():
Angle = 50
for i in range(20):
Titik.right(Angle)
Titik.forward(5)
Angle =- 5
def HalfDaun():
Angle = 275
for i in range(20):
Titik.right(Angle)
Titik.forward(5)
Angle =- 5
def TheDaun():
for i in range(8):
Titik.pencolor("Green")
Daun()
HalfDaun()
Titik.pencolor("Brown")
wn = turtle.Screen()
wn.title("A Little Flowers")
wn.bgcolor("Light Blue")
Titik = turtle.Turtle()
Titik.shape("blank")
Titik.speed(65)
Titik.pensize(2)
TheDaun()
Batang()
Titik.right(150)
Batang()
TheDaun()
Titik.right(-70)
Titik.penup()
Balik()
Titik.left(125)
Titik.forward(150)
Titik.right(90)
Titik.forward(180)
Titik.right(90)
Titik.pendown()
TheDaun()
Batang()
Titik.left(-55)
Batang2()
TheDaun()
Titik.left(20)
Titik.penup()
Titik.forward(550)
Titik.pendown()
TheDaun()
Batang()
Titik.left(-95)
Batang3()
TheDaun()
wn.mainloop()