Happy Republic Day

In this tutorial, we have made a Happy Republic day flag hosting scene with the help of Python turtle using different colors to make our page so attractive. We will also cover different examples to make this animated page.

Happy republic day
Happy republic day

Block of code:

In this Happy Republic Day block of code, we will create a rectangle to make a beautiful flag of India.

  • turt.begin_fill() is used to start filling color in the shape.
  • turt.fillcolor(color) is used to fill the color inside the shape.
  • turt.forward(400) is used to move the turtle in the forward direction.
  • turt.right(90) is used to move the turtle in the right direction.
  • turt.end_fill() is used to stop filling color.
def rectangle(color):
    turt.begin_fill()
    turt.fillcolor(color)
    for i in range(2):
        turt.forward(400)
        turt.right(90)
        turt.forward(100)
        turt.right(90)
    turt.end_fill()

Block of code:

In this Happy Republic Day block of code, we will create a rectangle and fill orange color in the rectangle and the top part of the flag.

  • turt=tur.Turtle() is used to make objects.
  • tur.title(“Pythontpoint”) is used to give the title to the window.
  • turt.up() is used to stop drawing.
  • turt.pensize(4) is used to give the size to pen.
  • turt.goto(0,-300) is used to move the turtle at the absolute position.
  • turt.down() is used to start drawing.
  • rectangle(“orange”) is used to draw a rectangle and fill orange color inside the shape.
turt=tur.Turtle()
tur.screensize(500,400)
tur.title("Pythontpoint")
turt.up()
turt.pensize(4)
turt.goto(0,-300)
turt.down()
turt.goto(0,400)
rectangle("orange")

Read:

Python Turtle Chess Game

Block of code:

In this Happy Republic Day block of code, we make an Asoka Chakra which is placed at the middle of the flag.

  • turt.goto(0,300) is used to move the turtle at the absolute position.
  • turt.forward(200) is used to move the turtle in the forward direction.
  • turt.color(“blue”) is used to give the blue color to the turtle.
  • turt.circle(-50) is used to draw the circle shape of the turtle.
turt.goto(0,300)
turt.forward(200)
turt.color("blue")
turt.circle(-50)
turt.setheading(270)
turt.forward(50)
turt.setheading(0)

Block of code:

In this Happy Republic Day block, we created the third rectangle fill the green color inside the triangle and complete our flag.

  • turt.setheading(90) is used to set the heading.
  • turt.forward(50) is used to move the turtle in the forward direction.
  • turt.color(“black”) is used to give the color to the turtle.
  • turt.right(90) is used to move the turtle in the right direction.
  • rectangle(“green”) is used to draw the rectangle and fill the green color inside the rectangle.
turt.setheading(90)
turt.forward(50)
turt.setheading(0)
turt.color("black")
turt.forward(200)
turt.right(90)
turt.forward(100)
turt.right(90)
turt.forward(400)
turt.right(90)
turt.forward(100)
turt.right(90)
turt.goto(0,200)
rectangle("green")

Code:

In the following code, we will learn about how to make a republic day flag with the help of a Python turtle.

  • turt.begin_fill() is used to start filling color.
  • turt.fillcolor(color) is used to fill the color inside the shape.
  • turt.forward(400) is used to move the turtle in the forward direction.
  • turt.right(90) is used to move the turtle in the right direction.
  • turt=tur.Turtle() is used to make objects.
  • tur.screensize(500,400) is used to give the size to the screen.
  • tur.title(“Pythontpoint”) is used to give the title to the window.
  • turt.up() is used to stop the drawing.
  • turt.down() is used to start drawing.
  • turt.color(“blue”) is used to give the color to the turtle here turtle is worked as a pen.
  • turt.setheading(0) is used to set the heading on the screen.
from turtle import *
import turtle as tur
def rectangle(color):
    turt.begin_fill()
    turt.fillcolor(color)
    for i in range(2):
        turt.forward(400)
        turt.right(90)
        turt.forward(100)
        turt.right(90)
    turt.end_fill()

turt=tur.Turtle()
tur.screensize(500,400)
tur.title("Pythontpoint")
turt.up()
turt.pensize(4)
turt.goto(0,-300)
turt.down()
turt.goto(0,400)
rectangle("orange")
turt.goto(0,300)
turt.forward(200)
turt.color("blue")
turt.circle(-50)
turt.setheading(270)
turt.forward(50)
turt.setheading(0)
for i in range(24):
    turt.forward(45)
    turt.bk(45)
    turt.left(15)
turt.setheading(90)
turt.forward(50)
turt.setheading(0)
turt.color("black")
turt.forward(200)
turt.right(90)
turt.forward(100)
turt.right(90)
turt.forward(400)
turt.right(90)
turt.forward(100)
turt.right(90)
turt.goto(0,200)
rectangle("green")
tur.done()

Output:

After running the above code we get the following output in which we can see that a beautiful Indian flag is drawn on the screen.

Happy republic day flag hosting
Happy republic day flag hosting

445 thoughts on “Happy Republic Day”

  1. I’ve been exploring for a bit for any high quality articles or blog posts on this sort of area . Exploring in Yahoo I at last stumbled upon this website. Reading this info So i am happy to convey that I’ve a very good uncanny feeling I discovered exactly what I needed. I most certainly will make sure to don’t forget this website and give it a glance regularly.

    Reply
  2. Please visit our contact page, and select “I need help with my account” if you believe this is an error. Please include your IP address in the description. Investigators also did not find “sufficient evidence” of insider trading, and were unable to determine if Cawthorn had access to nonpublic information about LGB coin’s failed bid to sponsor a NASCAR race car driver at the time of his investment. The U.S. House representatives require representatives to file timely reports on transactions related to cryptocurrency under the Stop Trading on Congressional Knowledge (STOCK) Act, which Cawthorn violated. From that point forward, it became a pro-Trump rallying cry. From the likes of Florida Republican Governor Ron Desantis, who began using the term “Brandon administration,” to Senator Ted Cruz (R-TX) touting the secretly crude anti-Biden phrase, Trumpworld quickly got hooked on saying it in public.
    https://abcblogdirectory.com/listings349533/copyright-brand
    All rights reserved © 2021 CoinCheckup DOWNLOADS Cryptocurrency prices are realtime, CT, and use 5PM ET as the close transition point for a new trading day. The Fear and Greed Index, and other crypto asset indexes, monitor market sentiment every day at midnight Greenwich Mean Time, providing a view of market emotion and sentiment. The Bitcoin Fear and Greed Index — like other indexes for the various crypto assets — is based on the idea that cryptocurrency investors tend to be collectively volatile and emotional. After spending its first decade or so of life as more of a fringe asset class, cryptocurrency has recently started gaining institutional acceptance. Bitcoin, the oldest and most established cryptocurrency, still accounts for the majority of investor interest and assets, but a long list of other digital currencies has also attracted more attention from both retail and institutional investors over the past couple of years. The value of assets invested in cryptocurrency globally totaled about $1.8 trillion as of Jan. 31, 2022.

    Reply

Leave a Comment