Turtle Import Drawing Source

 

What is Turtle

Turtle in Python allows you to draw things like shapes and pattern. It is a library in Python that you can import and then use it to draw whatever you want. In this, you will see an onscreen pointer shaped cursor that you can command to move left, right, back or forward to draw something for you and this pointer shaped cursor is known as “turtle”.

Turtle Import Drawing Source 

from turtle import *
import colorsys

tracer(100)
bgcolor("purple")
h=0.7
c=colorsys.hsv_to_rgb(h,1,1)
pensize(1)

def a():
    global h
    for i in range(4):
        c=colorsys.hsv_to_rgb(h,1,1)
        fillcolor(c)
        h+=0.004
        begin_fill()
        fd(50)
        right(20)
        fd(40)
        right(9)
        end_fill()

for i in range(400):
    a()
    goto(0,0)
    rt(1)

Comments

Popular posts from this blog

Chatrapati Shivaji Maharaj Picture Python Source Code

Html Webform Code