Wishing Happy New Year 2023 in Python Turtle

Wishing Happy New Year 2023 in Python Turtle

Guess what’s this time for? Yes, this is the time to say Hello to 2023!

2023 is approaching and if you want to wish Happy New Year in programming style, take a look here.

Let’s see how we can write code for Wishing Happy New Year 2023 in Python Turtle.

Code for Wishing Happy New Year 2023 in Python Turtle

Importing module

import turtle

Setting up Screen

screen = turtle.Screen()
screen.setup(width=1.0, height=1.0)
turtle.bgcolor('white')
tr = turtle.Turtle()
tr.speed("fastest")

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)

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)

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)

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)

Writing Happy New Year 2023 in Python turtle

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))

Complete code for Wishing Happy New Year 2023 in Python Turtle

import turtle
screen = turtle.Screen()
screen.setup(width=1.0, height=1.0)
turtle.bgcolor('white')
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()

Output

Image output:

output for Wishing Happy New Year 2023 in Python Turtle

Video output:

Thank you for visiting our website.


Also Read:

Share:
Avatar of Harry

Author: Harry

Hello friends, thanks for visiting my website. I am a Python programmer. I, with some other members, write blogs on this website based on Python and Programming. We are still in the growing phase that's why the website design is not so good and there are many other things that need to be corrected in this website but I hope all these things will happen someday. But, till then we will not stop ourselves from uploading more amazing articles. If you want to join us or have any queries, you can mail me at admin@copyassignment.com Thank you

4 thoughts on “Wishing Happy New Year 2023 in Python Turtle

Leave a Reply

Your email address will not be published. Required fields are marked *