-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHEART.PY
86 lines (36 loc) · 762 Bytes
/
HEART.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
import turtle
from turtle import *
wn = Screen()
wn.bgcolor('black')
t = turtle. Turtle()
t.pencolor('white')
def curve():
for i in range (200):
t.rt(1)
t.fd(1)
def heart():
t.fillcolor('red')
t.begin_fill()
t.lt (140)
t.fd (113)
curve ()
t.lt (120)
curve()
t.fd(112)
t.end_fill()
heart()
t.ht()
def write(message,pos):
x,y=pos
t.penup()
t.goto(x,y)
t.color('white')
style=("Stencil Std", 18, "italic")
t.write(message, font=style)
write('R',(-35,95))
write('U',(-20,95))
write('B',(-5,95))
write('E', (10,95))
write('S', (25,95))
write('H', (40,95))
wn.mainloop()