India flag

 


from turtle import *

speed(3)
hideturtle()
bgcolor('black')
lt(90)
fd(100)
rt(90)
rt(90)
def sqrt():
    for i in range(2):
        fd(60)
        lt(90)
        fd(240)
        lt(90)
color('green')
begin_fill()
sqrt()
end_fill()
lt(180)
fd(60)
lt(180)
color('white')
begin_fill()
sqrt()
end_fill()
lt(180)
fd(60)
lt(180)
color('orange')
begin_fill()
sqrt()
end_fill()

color('white','grey')
begin_fill()
lt(180)
fd(10)
lt(90)
fd(10)
lt(90)
fd(450)
lt(90)
fd(10)
lt(90)
fd(440)
end_fill()
color('orange')
rt(90)
fd(120)
rt(90)
penup()
fd(90)
pendown()

color('blue')
pensize(2)
def cir():
    fd(25)
    lt(180)
    fd(25)
for i in range(24):
    cir()
    lt(15)
fd(25)
lt(90)
circle(25)
penup()
rt(90)
fd(150)
rt(90)
fd(90)
lt(90)
pendown()
color('white')
write('Happy Independence Day!',font=('arial',16,'normal'))

color('white')
penup()
fd(175)
rt(90)
fd(30)
fd(60)
pendown()
color('grey','white')
begin_fill()
lt(90)
fd(20)
lt(90)
fd(118)
lt(90)
fd(20)
lt(90)
fd(118)
lt(90)
fd(20)

rt(90)
fd(50)
lt(90)
fd(20)
lt(90)
fd(218)
lt(90)
fd(20)
lt(90)
fd(50)
end_fill()

done()

Comments

Popular Posts