-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCaptain_America_Shield.py
More file actions
99 lines (41 loc) · 882 Bytes
/
Captain_America_Shield.py
File metadata and controls
99 lines (41 loc) · 882 Bytes
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
import turtle
import math
import time
t = turtle.Turtle()
def fnA(x, y):
t.penup()
t.goto(x, y)
t.pendown()
t.setheading(0)
t.pensize(2)
t.speed(10)
def fnB(r, color):
x_point = 0
y_pont = -r
fnA(x_point, y_pont)
t.pencolor(color)
t.fillcolor(color)
t.begin_fill()
t.circle(r)
t.end_fill()
def fnC(r, color):
fnA(0, 0)
t.pencolor(color)
t.setheading(162)
t.forward(r)
t.setheading(0)
t.fillcolor(color)
t.begin_fill()
for i in range(5):
t.forward(math.cos(math.radians(18)) * 2 * r) # 2cos18°*r
t.right(144)
t.end_fill()
t.hideturtle()
if __name__ == '__main__':
time.sleep(5)
fnB(288, 'crimson')
fnB(234, 'snow')
fnB(174, 'crimson')
fnB(114, 'blue')
fnC(114, 'snow')
turtle.done()