Monday, February 14, 2022

Making Turtle Graphics in Python

 import turtle
colors=['yellow','green','red','white','cyan','blue']
t=turtle.Turtle()
screen=turtle.Screen()
screen.bgcolor('black')
t.speed
for i in range(100):
    t.color(colors[i%6])
    t.fd(i*5)
    t.left(200)
    t.width(2)


    


No comments:

Post a Comment

MCQ QUESTIONS

Loading…