forked from eskayML/turtle-projects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
imposter using turtle.py
110 lines (77 loc) · 1.94 KB
/
imposter using turtle.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
import turtle
win = turtle.getscreen()
impostor = turtle.Turtle()
win.setup(width=400, height=600)
body_color = 'yellow'
glass_color = 'grey'
def body():
impostor.pensize(20)
impostor.fillcolor(body_color)
impostor.begin_fill()
impostor.right(90)
impostor.forward(50)
impostor.right(180)
impostor.circle(40, -180)
impostor.right(180)
impostor.forward(200)
impostor.right(180)
impostor.circle(100, -180)
impostor.backward(20)
impostor.left(15)
impostor.circle(500, -20)
impostor.backward(20)
impostor.circle(40, -180)
impostor.left(7)
impostor.backward(50)
impostor.up()
impostor.left(90)
impostor.forward(10)
impostor.right(90)
impostor.down()
impostor.right(240)
impostor.circle(50, -70)
impostor.end_fill()
def glass():
impostor.up()
impostor.right(230)
impostor.forward(100)
impostor.left(90)
impostor.forward(20)
impostor.right(90)
impostor.down()
impostor.fillcolor(glass_color)
impostor.begin_fill()
impostor.right(150)
impostor.circle(90, -55)
impostor.right(180)
impostor.forward(1)
impostor.right(180)
impostor.circle(10, -65)
impostor.right(180)
impostor.forward(110)
impostor.right(180)
impostor.circle(50, -190)
impostor.right(170)
impostor.forward(80)
impostor.right(180)
impostor.circle(45, -30)
impostor.end_fill()
def backpack():
impostor.up()
impostor.right(60)
impostor.forward(100)
impostor.right(90)
impostor.forward(75)
impostor.fillcolor(body_color)
impostor.begin_fill()
impostor.down()
impostor.forward(30)
impostor.right(255)
impostor.circle(300, -30)
impostor.right(260)
impostor.forward(30)
impostor.end_fill()
body()
glass()
backpack()
turtle.done()