Draw Shinchan with Python Turtle
इस article में, हम सीखेंगे कि python turtle mobile के साथ । यह article मुख्य रूप से शुरुआती और मध्यवर्ती कोडर्स पर केंद्रित होगा। आप पहले कोड पढ़ेंगे और फिर कोड्डींग करेंगे। आपको Python 3 में कुछ errors दिखाई दे सकती हैं लेकिन आप उन्हें अनदेखा कर सकते हैं। हमारे पास अन्य turtle पर लेख भी हैं।
अगर आप भी shinchan cartoon के fans हैं तो ये code से बना shinchan आपको पसंद आयेग
Code to draw Shinchan
HTML
<p>right(90)
forward(7)
right(90)
forward(23)
right(90)
forward(7)
right(90)
end_fill()
penup()
forward(25)
right(90)
forward(35)
pendown()
color('red')
forward(30)
penup()
right(90)
pendown()
begin_fill()
circle(5)
end_fill()
def allLegs(self):
self.leftLeg()
self.leftSock()
self.leftShoe()
self.rightLeg()
self.rightSock()
self.rightShoe()
def allHands(self):
self.rightHand()
self.leftHand()
self.myBis()
self.leftHand2()
def allEyebrows(self):
self.myEyebrow(-8, 300)
right(90)
self.myEyebrow(72, 300)
self.myEyelid(-9, 270)
left(15)
self.myEyelid(68, 265)
def allEyes(self):
self.myallEyes1(17, 275)
self.myallEyes2(95, 270)
def my_goto(self, x, y):
penup()
goto(x, y)
pendown()
def start(self):
self.shorts()
self.allLegs()
self.myShirt()
self.myHead()
self.allHands()
self.myMouth()
self.allEyebrows()
self.allEyes()
self.myRobot()
ht()
self.my_goto(80, -200)
write('CoderIndia.in', font=("Bradley Hand ITC", 30, "bold"))
done()
if __name__ == "__main__":
obj = Shinchan()
obj.start() </p>