Python Animation Code using Turtle Library in Hindi

Hello Dosto! Yaha humne ‘Turtle’ module ka use karke ek aasan Python Animation Code ka example diya hai.
Python Animation Code

Python Animation Code using Turtle Library in Hindi

Turtle ek pre-installed python library he, jo logo ko virtual canvas provid kar ke pictures aur shapes banane me saksham banata hai, drawing ke liye ap jis onscreen pen ka use karte hai usko Turtle kaha jata hai aur issi se library ko iska naam milta hai. Short me, Python Turtle library naye program ko majedar aur interactive tarike se yah mahsoos karane me madat karti he ki python ke sat programming kitni acchi hai.

Turtle ka use mukhiya roop se bacho ko computer ki duniya se parichit karne ke liye kiya jata hai, ye python ki language ko samjhane ka ek saral aur bahut hi accha tarika hai, yeh bacho ke liye python programming me apna pehla kadam uthane ka ek saandar avasar banta hai, aisa kaha jata hai ki, python turtle library keval chotte bacho tak hi seemit nahi hai, yah un bade logo ke liye bhi useful sabit hua hai, jo abhi python sikh rahe hai yah sikhna chahte hai.
Python Turtle Library se, ap alag-alag type ki shapes aur images draw or create kar sakte hai. Python Animation Code (Turtle) se ap bahut prakhar ki drawing bana sakte hai, iske 2 examples yaha niche diye gaye hai:

First Example:-

from turtle import*
title("Python Animation Code")
bgcolor("black")
speed(0)

for i in range(140):
    color("red")
    right(1)
    backward(1)
    for j in range(1):
        right(2)
        circle(110)
        hideturtle()

done()    
Output:-
Python Animation Code

Video Link:- Click me

Second Example:-

import turtle
import colorsys
s = turtle.Screen()
turtle.title('Python Animation Code')
s.setup(width=600, height=670)
turtle.bgcolor('black')
t1=turtle.Turtle()
t2=turtle.Turtle()
t3=turtle.Turtle()
t4=turtle.Turtle()
t1.pencolor('blue')
t2.pencolor('red')
t3.pencolor('green')
t4.pencolor('yellow')
turtle.tracer(35)
c=0.8888
t2.left(180)
t3.left(270)
t4.left(-270)

for i in range(130):
    p = colorsys.hsv_to_rgb(c, 1, 0.99)
    t1.pencolor(p)
    t2.pencolor(p)
    t3.pencolor(p)
    t4.pencolor(p)
    c+=0.003
    t1.circle(i)
    t2.circle(i)
    t3.circle(i)
    t4.circle(i)
    t1.hideturtle()
    t2.hideturtle()
    t3.hideturtle()
    t4.hideturtle()

turtle.done()
Output:-
Python Animation Code
Video Link:- Click me
Humari Website me aane ke liya apna dhanywaad!

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

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