Draw Ganpati using Python Turtle with Hinglish Description

Hello Friends! Mera naam Nitin hai aur meri website programmingkakeeda.com me apka swagat hai, aaj ka humara topic python turtle mudule ka use karke ek sundar sa ganpati ji ka face banana hai, bahut hi simple topic-Draw Ganpati using Python Turtle.
Draw Ganpati using Python Turtle

Draw Ganpati using Python Turtle with Hinglish Description

Is tutorial me hum dekhenge ki python programing me ganpati ji ka face kaise banaya jata hai, ganpati ji ek hindu bhagwan hai, jinko bhagwan ganesh ke naam se bhi jana jata hai, ganpati ji ka face banane ke liye hume python turtle ka use karna hoga jo hume graphics draw karne ko allows karta hai.

Humne Draw Ganpati Using Python me turtle module ka use kiya hai, aur agar ye module apke computer me pehle se install nahi he to, apko ye module install karne ki jarurat pad sakti hai, to please terminal me “pip install turtle” likh kar isko install kare, jyadatar turtle module python software ke sat install aata hai, to install karne ki jarurat nhi padti hai.

Ab hum aage badh rahe hai aur is project ko suru kar rahe hai:

  • bgcolor() function ka hum use background ka color dene ke liye kiya jata hai, yaha hum background ko black color de rahe hai.
  • pensize() function ka use pen ka aakar dene me kiya jata hai.
  • color() function ka use pen ka color decide karne ke liye karte hai.
  • speed() function pen ki speed control karne ke kaam aata hai.
  • left() function turtle ko left direction me move karne ke kaam me aata hai.
  • forward() function ka use turtle ko aage ki disha me le jane ke liye kiya jata hai.
  • backward() function ka use turtle ko piche ki disha me le jane ke liye kiya jata hai.
  • circle() function ka use circle draw karne ke liye kiya jata hai.
  • right() function ka use turtle ko right direction me move karne ke liye kiya jata hai.
  • penup() function ka use tab kiya jata hai jab hum screen par kuch bhi nhi draw kar rahe ho.
  • pendown() function ka use tab kiya jata he jab hum screen par kuch draw kar rahe ho.
  • goto() function ka use turtle ko x aur y axis me le jane ke liye kiya jata hai.
  • write() function ka use screen me kuch bhi likhne ke liye kiya jata hai.
  • done() function ka use window screen ko freez karne aur program ko end karne ke liye kiya jata hai.
Niche python turtle ka use karke ganpati ji ko draw karne ka pura code diya gaya hai, isko copy kare aur isko python file me paste kare aur isko apne computer ya laptop par run kare.
from turtle import *
title("Ganpati")
bgcolor("black")
color("red")
pensize(5)
speed(2)

left(60)
forward(50)
left(15)
circle(100,90)
forward(30)
pensize(10)
penup()
right(90)
forward(20)
pendown()

right(40)
circle(-50,90)
forward(20)
left(150)

#seconde head curve
color("red")
penup()
forward(40)
left(20)
pendown()
circle(50,90)

#third head curve
color("red")
penup()
goto(0,0)
pensize(5)
pendown()
left(30)
forward(120)
circle(60,270)

#eyes
color("#fc6600")
penup()
forward(30)
right(50)
forward(135)
pendown()
pensize(8)
circle(50,90)
left(95)
penup()
circle(60,75)

#eyebrows
penup()
forward(15)
left(90)
pensize(2)
pendown()
circle(70,90)

#ears
pensize(5)
penup()
forward(75)
right(90)
forward(20)
pendown()
circle(90,90)
forward(20)

circle(30,170)
right(180)
circle(28,180)
right(160)
circle(25,180)
right(160)
circle(22,160)
forward(20)
circle(60,45)

#trunk
penup()
goto(0,0)
left(130)
forward(140)
right(250)
backward(20)
circle(80,20)
circle(20,40)

right(110)
penup()
forward(20)
pendown()
pensize(10)
forward(50)
circle(100,80)
pensize(9)
circle(150,50)
pensize(7)
circle(100,60)
pensize(5)
circle(90,60)
pensize(4)
circle(40,60)
circle(10,90)

#head
color("red")
penup()
goto(0,0)
goto(-90,290)
right(230)
pendown()
circle(-100,50)
circle(200,20)
circle(50,30)
right(180)
circle(50,30)
circle(200,20)
circle(-100,40)
right(95)
penup()
forward(40)
right(90)
pendown()
circle(100,40)
penup()
circle(35,120)
right(30)
pendown()
pensize(1)
circle(60,50)

penup()
goto(-70,90)
fillcolor("red")
begin_fill()
circle(20,180)
end_fill()

penup()
left(75)
fillcolor("red")
begin_fill()
circle(70,35)
end_fill()

left(180)
backward(10)
pendown()
left(6)
pensize(5)
color("red")
circle(-80,40)
penup()
goto(0,0)

write("    Jay Shree Ganesh", font=
("Arial",20,"normal"),align="left")

color("red")
penup()
goto(-250,-60)
left(118)
forward(240)
right(-25)
pendown()
circle(90,65)
penup()
hideturtle()
done()
Pure code ko run karne ke baad hume ek output milta hai, jisko hum dekh sakte hai, turtle module ki help se humne screen par ek sundar drawing banayi hai, jo ap niche image me dekh sakte hai.
Draw Ganpati using Python Turtle
Video Link:- Click me
Hamari Website par aane ke liye apka dhanyawaad!  

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

0 टिप्पणियाँ
* Please Don't Spam Here. All the Comments are Reviewed by Admin.