HOW TO WRITE INDIA USING PYTHON??
Hello Guys, in this blog I will tell you how to write INDIA,
1. import turtle on your Vs-Code.
2. Follow the given instruction in the video.๐๐ผ
![]() |
INDIA |
import turtle as t
t.pencolor('white')
t.pensize(3)
t.bgcolor('#000080')
#allignments
t.penup()
t.forward(58)
t.left(90)
t.forward(75)
t.left(90)
t.pendown()
#function for curve
def curve01(a,d):
for i in range(d):
t.right(a)
t.forward(1)
def curve02(a,d):
for i in range(d):
t.left(a)
t.forward(1)
#ddddddddddddddd
t.begin_fill()
t.fillcolor('white')
t.forward(410)
curve01(2.5,75)
t.left(7.5)
t.forward(400)
t.left(90)
t.forward(18)
t.left(90)
t.forward(100)
curve01(2.9,65)
t.left(8)
t.forward(120)
curve01(3,30)
t.left(1.5)
t.forward(35)
t.left(89)
t.forward(265)
t.left(7.5)
curve01(2.5,75)
t.forward(265)
t.left(90)
t.forward(215)
curve01(3,30)
t.right(1)
t.forward(124)
curve01(3,30)
t.left(2.5)
t.forward(60)
curve01(0.29,100)
curve01(0.73,118)
t.left(115)
t.forward(20)
t.end_fill()
t.pencolor('#000080')
t.penup()
t.backward(50)
t.pendown()
t.right(1)
t.fillcolor('#000080')
t.begin_fill()
t.back(140)
t.left(90)
t.forward(83)
t.right(90)
t.forward(60)
curve01(0.6,70)
curve01(1,65)
t.end_fill()
t.pencolor('#FF9933')
t.penup()
t.right(165)
t.forward(400)
t.pendown()
t.fillcolor('#FF9933')
t.begin_fill()
t.right(90)
t.forward(10)
curve01(2.5,75)
t.left(9)
t.forward(175)
curve01(2.5,75)
t.left(7.5)
t.forward(171)
t.end_fill()
#iiiiiiiiiiiiiiiii
t.pencolor('#FF9933')
t.penup()
t.forward(100)
t.right(90)
t.forward(20)
t.pendown()
t.fillcolor('#FF9933')
t.begin_fill()
t.circle(25)
t.end_fill()
#nnnnnnnnnnnnnnnn
t.penup()
t.forward(57)
t.right(90)
t.forward(100)
t.pendown()
t.fillcolor("#FF9933")
t.begin_fill()
t.forward(175)
curve02(2.8,65)
t.right(1.5)
t.forward(158)
t.right(90)
curve01(0.55,40)
t.left(8)
curve01(0.6,50)
curve01(0.8,20)
curve01(2.7,15)
t.left(7)
t.forward(100)
curve02(0.5,50)
curve02(2,35)
t.right(12)
curve02(0.2,25)
curve02(2.72,70)
curve01(4,20)
curve01(2,15)
t.left(11)
t.forward(80)
curve02(0.5,190)
t.right(5)
curve02(0.2,48)
curve02(3,37)
t.end_fill()
#iiiiiiiiiiiiiiiii
t.pencolor('#138808')
t.penup()
t.left(65)
t.forward(387)
t.pendown()
t.fillcolor('#138808')
t.begin_fill()
t.right(92.5)
t.forward(183)
curve02(2.9,65)
t.right(8.5)
t.forward(183)
curve02(2.9,65)
t.end_fill()
t.penup()
t.back(120)
t.pendown()
t.right(15)
t.fillcolor('#138808')
t.begin_fill()
t.circle(25)
t.end_fill()
t.penup()
t.left(55)
t.forward(150)
t.pendown()
#AAAAAAAAAAAAAAAA
t.fillcolor('#138808')
t.begin_fill()
t.left(42)
t.forward(125)
curve01(5,18)
t.forward(200)
curve01(5,18)
curve01(0.23,80)
curve01(0.58,110)
curve01(0.1,112)
curve01(3,32)
t.left(10)
t.forward(98)
t.end_fill()
t.penup()
t.right(90)
t.forward(40)
t.pendown()
t.pencolor('#000080')
t.fillcolor("#000080")
t.begin_fill()
t.forward(145)
t.right(90)
curve01(0.7,140)
t.left(6)
t.forward(50)
t.right(88)
t.forward(80)
t.end_fill()
t.done()
Comments
Post a Comment
If you have any doubt you can comment