A Spindle Shape Design using Python Turtle
Source Code :
from turtle import *
import turtle
wn = Screen()
wn.setup(width=1200, height=680)
colors= ['green', 'cyan', 'blueviolet',
"lightblue', 'lightgreen', 'aquamarine']
t = turtle.Pen()
t.speed (0)
t.hideturtle()
turtle.bgcolor('black')
for i in range (300):
t.pencolor (colors [i%6])
t.width(i/100 +1)
t. forward (i)
t.left (59)
wn.mainloop()
0 Comments
Post a Comment