Hi Everyone,
Welcome to our blog to learn coding and get python codes.
To write python code you install pycharm (its my suggestion) app in your laptop or computer.
Today we are draw INDIAN FLAG by using Python.
This is☝ our first python project. Amazing beautyfull design by python laungauge.
This project source code here .👇
mport turtle
flag = turtle.Turtle()
turtle.bgcolor("white")
flag.speed(3)i
flag.pensize(5)
flag.color("blue")
def draw(x,y):
flag.penup()
flag.goto(x,y)
flag.pendown()
for i in range(24):
flag.forward(80)
flag.backward(80)
flag.left(15)
draw(0, -80)
flag.circle(80, 360)
#green rectangle
flag.color("green")
flag.begin_fill()
flag.forward(350)
flag.backward(700)
flag.right(90)
flag.forward(150)
flag.left(90)
flag.forward(700)
flag.left(90)
flag.forward(150)
flag.left(90)
flag.end_fill()
#orange rectangle
flag.color("orange")
draw(-350,80)
flag.begin_fill()
flag.right(180)
flag.forward(700)
flag.left(90)
flag.forward(150)
flag.left(90)
flag.forward(700)
flag.left(90)
flag.forward(150)
flag.left(90)
flag.end_fill()
turtle.done()
1 Comments