Python Turtle Art | Advanced Python Turtle Code

Yeh ap me se adhikaansh k liye bas ek simple image ho sakti hai, lekin is image ko Turtle ka upayog kar ke Python ke throw banaya gaya hai jisko hum Python Turtle Art kehte hai.
Python Turtle Art
Turtle ek drawing board ki tarah ek Python feature hai, jo hume Turtle ko drawing board screen k chaaro aur draw karne ka aadesh deta hai, hum turtle k kuch functions jaise turtle.forward() aur turtle.right() ka upayog kar sakte he jo turtle ko idhar-udhar le ja sakte hai, ye commomly used kiye jane wala method hai.

Python Turtle Art | Advanced Python Turtle Code

Code 1: First image ke liye code :-

from turtle import*
import colorsys 
title("Python Turtle Art")
bgcolor("black")
tracer(90)
pensize(2)
h = 0.3

for i in range(1100):
    c = colorsys.hsv_to_rgb(h,1,1)
    h += 0.005
    color(c)
    penup()
    goto(0, 0)
    circle(12, 50)
    forward(20)
    pendown()
    right(360)
    fillcolor(c)
    begin_fill()
    circle(10, 320)
    end_fill()
    backward(i/4)
    right(6)

done()

Output:-

Python Turtle Art
Video Link :- Click me

Code 2: Second image ke liye code:-

# turtle module ko import karwana
from turtle import*
# title me naam kya dena chahte ho
title("Python Turtle Art")
# background color kya dena chahte ho
bgcolor("black")
# draw karne ki speed 
speed(0)
# pen ka size kitna rakhna chahte ho
pensize(3)

for i in range(9):
    # pen ka color kya dena chahte ho
    color("yellow") 
    # turtle ko 60degree pr move karna
    left(60)
    circle(-18, 200)
    color("yellow", "red")
    # radius 100 rakhna
    r = 100
    for j in range(12):
        begin_fill()
        circle(r-11*j, 90)
        end_fill()
    # turtle ko 180degree pr move karna    
    left(180) 
    # pen ka likhna band krta hai   
    penup()
    #turtle ko x or y position pr move krna
    goto(0,0)
    # pen ka likhna chalu krta hai
    pendown()
    # turtle ko gayab karta hai
    hideturtle()

done()
Output:-

Python Turtle Art
Video Link:- Click me
Aasa hai ki apko is article ko pad kar aur python turtle Art ka use kar k aur meri throw di gai jankari acchi lagi hogi aur apko mera ye Python Art ka code using kar k maja aya hoga.Humari website dekhne k liye dhanyawad.

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

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