Independence Day program using python | crazycoder
code:
import turtle
def rectangle(color):
t.begin_fill()
t.fillcolor(color)
for i in range (2):
t.forward(250)
t.right(90)
t.forward(70)
t.right(90)
t.end_fill()
#bottom reactangle
def round_rectangle(center_x,center_y,width,height,cornersize):
turtle.up()
turtle.goto(center_x-width/2+cornersize,center_y-height/2)
turtle.down()
for _ in range(2):
turtle.fillcolor("black")
turtle.begin_fill()
turtle.fd(width-2*cornersize)
turtle.circle(cornersize,90)
turtle.fd(height-2*cornersize)
turtle.circle(cornersize,90)
turtle.end_fill()
wn = turtle.Screen()
wn.title("|| Tiranga || by:- crazycoder")
wn.setup(width=600, height=600)
# make Tiranga
t = turtle.Turtle()
round_rectangle(0,-300,300,70,37)
t.up()
t.pensize(3)
t.goto(0,-300)
t.down()
t.goto(0,200)
rectangle("#ff9933")
t.goto(0,130)
t.forward(125)
t.color("#000088")
t.circle(-35)
t.setheading(270)
t.forward(35)
t.setheading(0)
for i in range(24):
t.forward(33)
t.bk(33)
t.left(15)
t.setheading(90)
t.forward(35)
t.setheading(0)
t.color("black")
t.forward(125)
t.right(90)
t.forward(70)
t.right(90)
t.forward(250)
t.right(90)
t.forward(70)
t.right(90)
t.goto(0,60)
rectangle("#128807")
# Independance day
pen = turtle.Turtle()
pen.speed(0)
pen.shape("circle")
pen.color("orange")
pen.penup()
pen.hideturtle()
pen.goto(0, 240)
pen.write("Happy Independace Day", align="center", font=("futura", 35, "bold"))
pen.goto(0, 205)
pen.write("वंदे मातरम्", align="center", font=("futura", 20, "bold"))
wn.mainloop()
Every free nation of the world has its own flag. It is a symbol of a free country. The National Flag of India was adopted in its present form during the meeting of Constituent Assembly held on the 22 July 1947, a few days before India's independence from the British on 15 August, 1947. It served as the national flag of the Dominion of India between 15 August 1947 and 26 January 1950 and that of the Republic of India thereafter. In India, the term "tricolour" refers to the Indian national flag.
The National flag of India is a horizontal tricolor of deep saffron (kesari) at the top, white in the middle and dark green at the bottom in equal proportion. The ratio of width of the flag to its length is two to three. In the centre of the white band is a navy blue wheel which represents the chakra. Its design is that of the wheel which appears on the abacus of the Sarnath Lion Capital of Ashoka. Its diameter approximates to the width of the white band and it has 24 spokes.
Follow Us On