top of page
Search

Draw Indian flag | Python project | How to create indian flag using python turtle |


source code


from turtle import *

# speed(10)

penup()

goto((-150, -300))

pendown()

colormode(255)

color((128, 128, 128))

begin_fill()

forward(300)

left(90)

forward(50)

left(90)

forward(300)

end_fill()

color((169, 169, 169))

begin_fill()

left(90)

forward(50)

left(180)

forward(50)

right(90)

forward(50)

left(90)

forward(50)

right(90)

forward(200)

right(90)

forward(50)

end_fill()

right(180)

forward(50)

left(90)

forward(110)

right(90)

colormode()

color("brown")

begin_fill()

forward(500)

right(90)

forward(20)

right(90)

forward(500)

end_fill()

right(180)

forward(470)

right(90)

colormode(255)

color((255, 69, 0))

begin_fill()

forward(250)

right(90)

forward(50)

right(90)

forward(250)

end_fill()

color("black")

left(90)

forward(50)

left(90)

forward(125)

colormode()

color("blue")

circle(25)

left(90)

forward(50)

left(180)

forward(25)

left(180)

for i in range(11):

left(15)

forward(25)

left(180)

forward(50)

left(180)

forward(25)

left(15)

# forward(5)

# begin_fill()

# circle(10)

# end_fill()

# right(90)

forward(25)

left(90)

color("black")

forward(125)

left(90)

forward(50)

left(180)

forward(50)

color("green")

begin_fill()

forward(50)

right(90)

forward(250)

right(90)

forward(50)

right(90)

forward(250)

end_fill()

hideturtle()


exitonclick()



OUTPUT




IF YOU WANT FULL VIDEO THEN CLICK ON ABOVE PHOTO




 
 
 

2 Comments


jazyharshforever
Dec 27, 2021

Really working

Like

jazyharshforever
Dec 27, 2021

It's

Like

Subscribe Form

Thanks for submitting!

9234937707

©2021 by Code with harsh. Proudly created with Wix.com

bottom of page