Create Design1.py

Color Changing Pattern using Turtle
This commit is contained in:
Jagdamba Tripathi 2022-10-16 08:15:52 +05:30 committed by GitHub
parent e37961483b
commit 1b4dbcbf2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,21 @@
import turtle as t
t.bgcolor("black")
t.speed(0)
t.pensize(2)
colors=['red','yellow','blue','purple','green','#fe019a','black','white','red','yellow','blue','purple','green','#fe019a','black','white']
distance=170
t.hideturtle()
for color in colors:
t.color(color)
for j in range(8):
t.left(45)
for i in range (2):
t.forward(distance)
t.left(60)
t.forward(distance)
t.left(120)
t.done()