-
Notifications
You must be signed in to change notification settings - Fork 0
/
turtlefreeformartgallery.py
113 lines (66 loc) · 1.37 KB
/
turtlefreeformartgallery.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import turtle
turtle.speed(100)
turtle.color("blue")
def star(turtle, side):
for i in range(5):
turtle.forward(100)
turtle.right(144)
for i in range(80):
star(turtle, 50)
turtle.right(5)
size = 1.5
turtle.penup()
turtle.goto(-200, -100)
turtle.pendown()
turtle.color("red")
turtle.speed(20)
size += 1
turtle.speed(20)
turtle.speed(20)
def square(turtle,side):
for i in range(4):
turtle.right(90)
turtle.forward(100)
for i in range(72):
square(turtle,75)
turtle.left(5)
turtle.penup()
turtle.goto(200, 200)
turtle.pendown()
turtle.speed(100)
turtle.color("")
def star(turtle, side):
for i in range(5):
turtle.forward(size)
turtle.right(144)
for i in range(72):
star(turtle, 50)
turtle.right(5)
turtle.penup()
turtle.goto(-300, 200)
turtle.pendown()
size = 2.6
turtle.speed(100)
turtle.color("green")
def square(turtle, side):
for i in range(5):
turtle.forward(size)
turtle.right(90)
for i in range(80):
square(turtle, 50)
turtle.right(5)
size += 3
turtle.penup()
turtle.goto(100, -200)
turtle.pendown()
size = 4.1
turtle.speed(120)
turtle.color("purple")
def star(turtle,side):
for i in range(5):
turtle.forward(side)
turtle.right(90)
for i in range(80):
star(turtle, 50)
turtle.right(5)
turtle.exitonclick()