-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspecials.py
77 lines (69 loc) · 1.45 KB
/
specials.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
import math
import turtle
t = turtle.Turtle()
t.pensize(5)
line_height = 70
letter_distance = 35
def draw_i():
t.penup()
t.forward(line_height/4)
t.pendown()
t.left(90)
t.forward(line_height/2)
t.left(90)
t.forward(line_height/4)
t.back(line_height/2)
t.forward(line_height/4)
t.left(90)
t.forward(line_height)
t.right(90)
t.forward(line_height/4)
t.back(line_height/2)
t.forward(line_height/4)
t.right(90)
t.forward(line_height/2)
t.right(90)
t.penup()
t.forward(line_height/4)
t.forward(letter_distance)
t.pendown()
def draw_q_wrong():
t.right(90)
t.circle(line_height / 2)
t.left(90)
t.penup()
t.forward(line_height / 2)
t.pendown()
t.right(45)
side_length = math.sqrt(2 * (line_height / 2) ** 2) ## diameter of a square
t.forward(side_length)
t.penup()
t.left(45)
t.left(90)
t.forward(line_height / 2)
t.left(90)
t.forward(letter_distance)
t.pendown()
def draw_special_2():
draw_q_wrong()
draw_q_wrong()
draw_i()
def logic_special_1():
draw_i()
t.left(90)
t.circle(line_height / 2)
t.left(90)
t.circle(line_height / 2)
draw_i()
def draw_special_1():
logic_special_1()
for i in range(3):
t.penup()
t.back(line_height)
t.left(90)
t.pendown()
logic_special_1()
if __name__ == "__main__":
draw_special_2()
t.hideturtle()
input()