-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhappy-new-year.py
82 lines (80 loc) · 1.85 KB
/
happy-new-year.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
import turtle
screen = turtle.Screen()
screen.setup(width=1.0, height=1.0)
turtle.bgcolor('black')
tr = turtle.Turtle()
tr.speed("fastest")
tr.up()
# left decoration
for i in range(10):
for i in range(2):
tr.pensize(7)
tr.goto(-500, 0)
tr.down()
tr.color("purple")
tr.forward(100)
tr.circle(5, steps=4)
tr.right(60)
tr.color("violet")
tr.forward(50)
tr.right(120)
tr.right(30)
tr.up()
# right decoration
for i in range(10):
for i in range(2):
tr.pensize(7)
tr.goto(470, 0)
tr.down()
tr.color("red")
tr.forward(100)
tr.circle(5, steps=4)
tr.right(60)
tr.color("crimson")
tr.forward(50)
tr.right(120)
tr.right(30)
tr.up()
# top decoration
for i in range(10):
for i in range(2):
tr.pensize(7)
tr.goto(20, 265)
tr.down()
tr.color("forest green")
tr.forward(100)
tr.circle(5, steps=4)
tr.right(60)
tr.color("lime")
tr.forward(50)
tr.right(120)
tr.right(30)
tr.up()
# bottom decoration
for i in range(10):
for i in range(2):
tr.pensize(7)
tr.goto(20, -220)
tr.down()
tr.color("dark turquoise")
tr.forward(100)
tr.circle(5, steps=4)
tr.right(60)
tr.color("cyan")
tr.forward(50)
tr.right(120)
tr.right(30)
turtle.up()
turtle.color('red')
turtle.goto(-320, 40)
turtle.write("Happy ", font=(None, 60))
turtle.goto(-60, 40)
turtle.color('deep pink')
turtle.write("New", font=(None, 60))
turtle.goto(145, 40)
turtle.color('blue')
turtle.write("Year", font=(None, 60))
turtle.goto(-74, -60)
turtle.color('green')
turtle.write("2023!", font=(None, 60))
turtle.done()