Python Program to draw colour rings|Using Turtle

import turtle
colors=[‘orange’,’red’,’pink’,’yellow’,’blue’,’green’]
screen=turtle.Screen()
trtl=turtle.Turtle()
trtl.speed(0)
screen.bgcolor(“black”)

for x in range(120):
trtl.pencolor(colors[x%6])
trtl.width(x/5+1)
trtl.forward(x)
trtl.left(20)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: