0% found this document useful (0 votes)
9 views

Indian Flag Source Code Python.coder

The document contains Python code that uses the Turtle graphics library to create a colorful design. It draws an orange rectangle, a green rectangle, a large navy blue circle, a smaller white circle, and multiple mini blue circles arranged in a circular pattern. Additionally, it includes spokes radiating from the center of the design.

Uploaded by

donzeusnguie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Indian Flag Source Code Python.coder

The document contains Python code that uses the Turtle graphics library to create a colorful design. It draws an orange rectangle, a green rectangle, a large navy blue circle, a smaller white circle, and multiple mini blue circles arranged in a circular pattern. Additionally, it includes spokes radiating from the center of the design.

Uploaded by

donzeusnguie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

import turtle

from turtle import*

#screen for output


screen = turtle.Screen()
screen.title("@python.coder_ ")

# Defining a turtle Instance


t = turtle.Turtle()
speed(0)

# initially penup()
t.penup()
t.goto(-400, 250)
t.pendown()

# Orange Rectangle
#white rectangle
t.color("orange")
t.begin_fill()
t.forward(800)
t.right(90)
t.forward(167)
t.right(90)
t.forward(800)
t.end_fill()
t.left(90)
t.forward(167)

# Green Rectangle
t.color("green")
t.begin_fill()
t.forward(167)
t.left(90)
t.forward(800)
t.left(90)
t.forward(167)
t.end_fill()

# Big Blue Circle


t.penup()
t.goto(70, 0)
t.pendown()
t.color("navy")
t.begin_fill()
t.circle(70)
t.end_fill()

# Big White Circle


t.penup()
t.goto(60, 0)
t.pendown()
t.color("white")
t.begin_fill()
t.circle(60)
t.end_fill()

# Mini Blue Circles


t.penup()
t.goto(-57, -8)
t.pendown()
t.color("navy")
for i in range(24):
t.begin_fill()
t.circle(3)
t.end_fill()
t.penup()
t.forward(15)
t.right(15)
t.pendown()

# Small Blue Circle


t.penup()
t.goto(20, 0)
t.pendown()
t.begin_fill()
t.circle(20)
t.end_fill()
# Spokes
t.penup()
t.goto(0, 0)
t.pendown()
t.pensize(2)
for i in range(24):
t.forward(60)
t.backward(60)
t.left(15)

#to hold the


#output window
turtle.done()

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy