Python Projects & Free Courses
57.1K subscribers
87 photos
1 video
40 files
8 links
Free Python Projects & Free Courses
Download Telegram
Data Structures Interview Preparation ๐Ÿ–ฅ๏ธ๐Ÿ’ฏ๐Ÿš€
--- Indian Flag๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ‡ฎ๐Ÿ‡ณ Source Code ---

import turtle
from turtle import *

# setting the screen for drawing
scr = turtle.Screen()
# Defining the instance of turtle
ttl = turtle.Turtle()
speed(20)

# keeping the pen up initially
ttl.penup()
ttl.goto(-150, 125)
ttl.pendown(
)
# Drawing the Orange Rectangle first
#and then the white rectangle
ttl.color("orange")
ttl.begin_fill()
ttl.forward(400)
ttl.right(90)
ttl.forward(84)
ttl.right(90)
ttl.forward(400)
ttl.end_fill()
ttl.left(90)
ttl.forward(84)

# now drawing the Green Rectangle
ttl.color("green")
ttl.begin_fill()
ttl.forward(84)
ttl.left(90)
ttl.forward(400)
ttl.left(90)
ttl.forward(84)
ttl.end_fill()

# Drawing the central Big Blue Circle
ttl.penup()
ttl.goto(35, 0)
ttl.pendown()
ttl.color("navy")
ttl.begin_fill()
ttl.circle(35)
ttl.end_fill()

# Drawing the in-circle Big White Circle
ttl.penup()
ttl.goto(30, 0)
ttl.pendown()
ttl.color("white")
ttl.begin_fill()
ttl.circle(30)
ttl.end_fill()

#Drawing the inside Mini Blue Circles of Flag
ttl.penup()
ttl.goto(-27, -4)
ttl.pendown()
ttl.color("navy")
for j in range(24):
ttl.begin_fill()
ttl.circle(2)
ttl.end_fill()
ttl.penup()
ttl.forward(7)
ttl.right(15)
ttl.pendown()

# drawing the Smaller Blue Circle
ttl.color("navy")
ttl.penup()
ttl.goto(10, 0)
ttl.pendown()
ttl.begin_fill()
ttl.circle(10)
ttl.end_fill()

#Drawing the 24 spokes of the Indian Flag
ttl.penup()
ttl.goto(0, 0)
ttl.pendown()
ttl.pensize(1)
for j in range(24):
ttl.forward(30)
ttl.backward(30)
ttl.left(15)

#Drawing the stick of the Indian flag
ttl.color("Brown")
ttl.pensize(10)
ttl.penup()
ttl.goto(-150,125)
ttl.right(180)
ttl.pendown()
ttl.forward(500)

#to hide the turtle pen we used hideturtle
ttl.hideturtle()
#holding the output on the window
turtle.done()
Python Projects & Free Courses pinned ยซ--- Indian Flag๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ‡ฎ๐Ÿ‡ณ Source Code --- import turtle from turtle import * # setting the screen for drawing scr = turtle.Screen() # Defining the instance of turtle ttl = turtle.Turtle() speed(20) # keeping the pen up initially ttl.penup()โ€ฆยป
Who is the Father of Computer ๐Ÿค”
Anonymous Quiz
18%
Dennis Ritchie
74%
Charles Babbage
8%
James Gosling
Did you register in above Free Python & Coding Course Opportunity ๐Ÿค”๐Ÿค”
Anonymous Poll
63%
Yes done โœ…
37%
Doing SignUp now ๐Ÿš€
Important Methods in Python Programming
What is output of print(math.pow(3, 2))?
Anonymous Quiz
31%
9.0
49%
9
11%
None
9%
None of the mentioned
Important Computer Shortcuts ๐Ÿ’ป
Top 50 HR Interview Questions with Answers โœ