Ticker

6/recent/ticker-posts

Unique Pattern With Turtle In Python - pattern 2

 


In this program we are going to make a very unique pattern in python using turtle library.

Its super easy to code and so much fun. Try out this program and the code is following :



    import turtle

    col=('red','yellow','green','cyan','pink',
    'white')

    t=turtle.Turtle()

    screen=turtle.Screen()
    screen.bgcolor('black')
    t.speed(50)

    for i in range (150):

        t.color(col[i%6])
        t.forward(i*1.5)
        t.left(59)
        t.width(3)
    

Post a Comment

0 Comments