Draw Indian Flag Using Coding #independenceday2022 #azadikaamritmahotsav By CodeWithShani

Draw Indian Flag Using Coding


Introduction :

In this Post, I Will Tell You How You can Draw Indian Flag Using Python Turtle. and I Hope You Will Like this Post. So If You also want to Draw Indian Flag then Read This Article till the End. So Let's Get Started.


Code :

#import turtle

import turtle

from turtle import *


# screen for output

screen = turtle.Screen()

# Defining a turtle Instance

t = turtle.Turtle()

speed(1)


# initially penup()

t.penup()

t.goto(-200, 125)

t.pendown()

# Orange Rectangle

#white rectangle

t.color("orange")

t.begin_fill()

t.forward(400)

t.right(90)

t.forward(84)

t.right(90)

t.forward(400)

t.end_fill()

t.left(90)

t.forward(84)


# Green Rectangle

t.color("green")

t.begin_fill()

t.forward(84)

t.left(90)

t.forward(400)

t.left(90)

t.forward(84)

t.end_fill()


# Big Blue Circle

t.penup()

t.goto(35, 0)

t.pendown()

t.color("navy")

t.begin_fill()

t.circle(35)

t.end_fill()


# Big White Circle

t.penup()

t.goto(30, 0)

t.pendown()

t.color("white")

t.begin_fill()

t.circle(30)

t.end_fill()


#Mini Blue Circles of Flag

t.penup()

t.goto(-27, -4)

t.pendown()

t.color("navy")

for i in range(24):

    t.begin_fill()

    t.circle(2)

    t.end_fill()

    t.penup()

    t.forward(7)

    t.right(15)

    t.pendown()


# Small Blue Circle

t.color("navy")

t.penup()

t.goto(10, 0)

t.pendown()

t.begin_fill()

t.circle(10)

t.end_fill()


#The spokes of India Flag

t.penup()

t.goto(0, 0)

t.pendown()

t.pensize(1)

for i in range(24):

    t.forward(30)

    t.backward(30)

    t.left(15)


#for stick of the flag

t.color("Brown")

t.pensize(10)

t.penup()

t.goto(-200,125)

t.right(180)

t.pendown()

t.forward(800)


#to hold the

#output window

turtle.do


Output:


























Programming Logic Building With Python - (Ebook):

दोस्तों अगर आप भी उन सभी लोगों में से हैं जो Programming में अपना Logic नहीं लगा पाते ?  तो अगर आप का उत्तर है हां, तो अब आप को डरने की कोई जरूरत नहीं है क्योंकि मैंने आपके लिए एक Ebook बनाई है, जिसका नाम है Programming Logic building With Python, जिसमें कि आप Programming Logic Building सीख सकते हैं | हमने इस बुक में 250+ Problems को दिया है जिन्हें आप Solve करके अपने Logics को Sharp कर सकते हैं और इस बुक में 25+ Real Life Projects भी आपको मिल जाएंगे ताकी आप लोग Real Life Projects पर काम करना भी शुरू कर दें | तो अगर आप भी Programming में अपनी Logic को Build करना चाहते हैं, अपने Programming Logics को Sharp करना चाहते हैं, तो यह Ebook सिर्फ आपके लिए है तो अगर आप इस Ebook को खरीदना करना चाहते हैं तो आप नीचे दिए गए लिंक पर क्लिक करके इस Ebook को खरीद सकते हैं और इस Ebook में जितने भी Problems है उन्हें Solve करने के बाद आपकी जो Programming Logics है वह Next Level की हो जाएगी |


Ebook Buy Link : tinyurl.com/ybbzpl6q



Hashtags :

#independenceday2022  #azadikaamritmahotsav #python #python3 #whatispython #pythonversion #programming #coding #coders #leanrpython #pythonprogramming #learncoding #pythoncourse #pythonlanguage #pythonebooks #developer #webdevelopment #code #hacking #artificialintelligence #ai #ml #machinelearning #desktopapplication #gui #games #gamedevelopment #hacking #webdeveloper #trending #trendingcourse #skills #learnskill #newskills #pythonmasteryfullcourse

एक टिप्पणी भेजें

0 टिप्पणियाँ