Python Turtle Ka Use Karke Avengers Logo

Yadi aap Python Turtle Ka Use Karke Avengers Logo banana chahte hain, to aap sahi jagah par aye hain, apna khud ka Avengers logo banane ke liye is tutorial me dikhaye gaye steps ko follow kare.
Python Turtle Ka Use Karke Avengers Logo

Python Turtle Ka Use Karke Avengers Logo

Avengers duniya ki sabse lokpriye superhero movies me se ek hai. mei avengers movies ka bahut bada fan hu, isliye aaj ek fan ke roop me meine python me Avengers logo banane par yah tutorial banane ka decided kiya hai.

Niche Python Turtle Ka Use Karke Avengers Logo banane ke liye python program hai. Ab is program ko chalne ke liye apko apne computer par python install karna hoga aur iske baad:

Turtle ek built-in library hai isliye hume isko alag se install karne ki jarurat nahi hai. Hume bas library ko apne python environment me import karne ki jarurat hai. Python turtle library me ve sabhi important methods aur functions shamil hain jinki hume apne designs aur images banane ke liye jarurat hogi. Following command ka use karke turtle library ko import kare.

$pip install turtle

Turtle ek pre-installed Python library hai jo users ko virtual canvas provide karke pictures aur shapes banane me shaksham banati hai. Drawing ke liye ap jis onscreen pen ka use karte hain usko turtle kaha jata hai aur isse hi library ko iska naam milta hai.

Step 1: Turtle module import kare:-

from turtle import *
title("Avengers Logo")
bgcolor('black')
setup(width=650, height=670)
speed(10)
pensize(10)
penup()

Step 2: First circle draw karna:-

def print_circle():
    # bhahar ka gola
    setposition(0, -280)
    pendown()
    begin_fill()
    color('blue')
    pencolor('red')
    circle(300)
    end_fill()
    penup()

Step 3: Second circle draw karna:-

def print_circle2():
    # andar ka gola
    pensize(2)
    setposition(0, -230)
    pendown()
    begin_fill()
    color('black')
    circle(250)
    end_fill()
    penup()

Step 4: ‘A’ draw karna:-

def print_A():
    # print 'A'
    setposition(30, -110)    
    pendown()
    begin_fill()
    color('blue')
    pensize(10)
    pencolor('red')
    forward(23)
    backward(123)
    left(60)
    backward(220)
    right(60)
    backward(100)
    right(117)
    backward(710)
    right(63)
    backward(110)
    right(90)
    backward(510)
    right(90)
    backward(100)
    right(90)
    backward(70)
    end_fill()
    penup()

Step 5: Triangle draw karna:-

def print_triangle():
    # 2d jaisa dikhne k liye 'A'
    # me triangle shape
    pensize(10)    
    setposition(53, -40)
    pendown()
    begin_fill()
    color('black')
    pencolor('red')
    right(90)
    forward(100)
    right(115)
    forward(250)
    right(157)
    forward(227)
    end_fill()

Step 6: ‘A’ ke andar ka arrow draw karna:-

def print_arrow():
    # 'A' ke andar ka arrow
    backward(80)    
    left(42)
    forward(147)
    right(83)
    forward(140)

Last Step: def functions run karna:-

print_circle()    
print_circle2()
print_A()
print_triangle()
print_arrow()

Pura code:-

from turtle import *
title("Avengers Logo")
bgcolor('black')
setup(width=650, height=670)
speed(10)
pensize(10)
penup()

def print_circle():
    # bhahar ka gola
    setposition(0, -280)
    pendown()
    begin_fill()
    color('blue')
    pencolor('red')
    circle(300)
    end_fill()
    penup()

def print_circle2():
    # andar ka gola
    pensize(2)
    setposition(0, -230)
    pendown()
    begin_fill()
    color('black')
    circle(250)
    end_fill()
    penup()

def print_A():
    # print 'A'
    setposition(30, -110)    
    pendown()
    begin_fill()
    color('blue')
    pensize(10)
    pencolor('red')
    forward(23)
    backward(123)
    left(60)
    backward(220)
    right(60)
    backward(100)
    right(117)
    backward(710)
    right(63)
    backward(110)
    right(90)
    backward(510)
    right(90)
    backward(100)
    right(90)
    backward(70)
    end_fill()
    penup()

def print_triangle():
    # 2d jaisa dikhne k liye 'A'
    # me triangle shape
    pensize(10)    
    setposition(53, -40)
    pendown()
    begin_fill()
    color('black')
    pencolor('red')
    right(90)
    forward(100)
    right(115)
    forward(250)
    right(157)
    forward(227)
    end_fill()

def print_arrow():
    # 'A' ke andar ka arrow
    backward(80)    
    left(42)
    forward(147)
    right(83)
    forward(140)

print_circle()    
print_circle2()
print_A()
print_triangle()
print_arrow()

hideturtle()
done()

Output:-

Python Turtle Ka Use Karke Avengers Logo
Video Link:- Click me

Yahan apke liye kuch aur python drawing tutorials hain:

Mujhe aasha hai ki aap is tutorial se jo khoj rahe the vah apko mil gaya hai, aur yadi ap is tarah ke aur adhik python programs aur tutorial chahte hain, to future ke updates ke liye humari Website ke page ko save karle.

Padhne ke liye dhanyawaad, apka din shubh rahe!

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

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