-
Notifications
You must be signed in to change notification settings - Fork 7
/
anengerslogo.py
112 lines (96 loc) · 2.15 KB
/
anengerslogo.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
import turtle
def draw_circle(pen):
# outer circle
pen.setposition(0, -280)
pen.pendown()
pen.begin_fill()
pen.color('gainsboro')
pen.pencolor('gray')
pen.circle(300)
pen.end_fill()
pen.penup()
def draw_circle2(pen):
# inner circle
pen.pensize(2)
pen.setposition(0, -230)
pen.pendown()
pen.begin_fill(
pen.color('black')
pen.circle(250)
pen.end_fill()
pen.penup()
def draw_A(pen):
# drawing ‘A’
pen.setposition(30, -110)
pen.pendown()
pen.begin_fill()
pen.color('gainsboro')
pen.pensize(10)
pen.pencolor('gray')
pen.forward(23)
pen.backward(123)
pen.left(60)
pen.backward(220)
pen.right(60)
pen.backward(100)
pen.right(117)
pen.backward(710)
pen.right(63)
pen.backward(110)
pen.right(90)
pen.backward(510)
pen.right(90)
pen.backward(100)
pen.right(90)
pen.backward(70)
pen.end_fill()
pen.penup()
def draw_triangle(pen):
# Triangle shape in ‘A’ to make it look like 2d
pen.pensize(10)
pen.setposition(53, -40)
pen.pendown()
pen.begin_fill()
pen.color('black')
pen.pencolor('gray')
pen.right(90)
pen.forward(100)
pen.right(115)
pen.forward(250)
pen.right(157)
pen.forward(227)
pen.end_fill()
def draw_arrow(pen):
# arrow
pen.backward(80)
pen.left(50)
pen.forward(165)
pen.right(97)
pen.forward(155)
pen.right(127)
pen.penup()
pen.pensize(3)
pen.color('gainsboro')
pen.setposition(147, -88)
pen.pendown()
pen.begin_fill()
pen.forward(37)
pen.right(133)
pen.forward(30)
pen.right(100)
pen.forward(30)
pen.end_fill()
if __name__ == '__main__':
win = turtle.Screen()
win.bgcolor('black')
avengers = turtle.Turtle()
avengers.speed(0)
avengers.pensize(5)
draw_circle(avengers)
draw_circle2(avengers)
draw_A(avengers)
draw_triangle(avengers)
draw_arrow(avengers)
avengers.penup()
avengers.hideturtle()
turtle.done()