-
Notifications
You must be signed in to change notification settings - Fork 0
/
turtles.py
51 lines (35 loc) · 865 Bytes
/
turtles.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
#Opens a window and draws a flower
import turtle
window= turtle.Screen()
window.bgcolor("Turquoise")
alice=turtle.Turtle()
alice.shape("arrow")
alice.speed("fastest")
alice.color("Navy", "yellow")
def draw_rhombus(name):
for i in range (2):
alice.forward(90)
alice.right(50)
alice.forward(90)
alice.right(130)
def draw_flower():
for j in range(36):
# alice.begin_fill()
draw_rhombus(alice)
# alice.end_fill()
alice.right(10)
for i in range(36):
alice.circle(60)
alice.right(10)
alice.right(90)
alice.forward(300)
alice.left(90)
alice.circle(190,55)
alice.left(125)
alice.circle(190,55)
alice.right(115)
alice.circle(190,55)
alice.left(125)
alice.circle(190,55)
window.exitonclick()
draw_flower()