Happy Diwali 2023 wish using Python Turtle Graphics | How to write message text using Python Turtle | Best light animation using Python Graphics
HELLO VIEWERS YOU MIGHT BE INTERESTED IN THIS POST.
Your welcome to our website COMPUTER SOFT SKILLS, after reading this article you can make this in just 2 minutes.
#_________ WELCOME ALL OF YOU ON COMPUTER SOFT SKILLS CHANNEL __________
#........................ WISH HAPPY DIWALI USING PYHON TURTLE GRAPHICS ......................
import turtle
import random
import colorsys
# Turtle Window
wn = turtle.Screen()
wn.setup(800,750)
wn.title("Computer Soft Skills: HAPPY DEEPAVALI")
turtle.bgcolor('LAVENDER')
turtle.tracer(2)
t=turtle.Turtle()
t.hideturtle()
t.pensize(3)
hue=0.5
#WRITE TEXT
t.penup()
t.goto(40,-190)
t.pendown()
t.color('RED')
style = ('ARIAL BLACK',100,'normal')
t.write('2023', font=style, align='center',move='FALSE')
t.hideturtle()
#___CRACKERS_______________
for i in range (50):
x=random.randint(-400,500)
y=random.randint(-200,450)
z=random.randint(-300,600)
t.speed(80)
t.penup()
t.goto(x,y)
t.pendown()
size=random.randint(10,250)
for i in range(36):
color=colorsys.hsv_to_rgb(hue,1,1)
t.pencolor(color)
t.fd(size)
t.bk(size)
t.lt(10)
hue +=0.01
def write(message,pos):
x,y=pos
t.penup()
t.goto(x,y)
style=('ARIAL BLACK',50,'normal')
t.write(message,font=style)
write('HAPPY DEEPAVALI',(-380,0))
turtle.done()
If you like this Python Programming then share it with your friends, Thanks.
0 Comments