import turtle
sc=turtle.Screen()
sc.setup(700,700)
spiral=turtle.Turtle()
spiral.speed(10)
sc.bgcolor("black")
col=("green","white","red","blue","white")
c=0
for i in range(60):
spiral.forward(i*10)
spiral.right(144)
spiral.color(col[c])
if c==3:
c=0
else:
c+=1
The output is:-
Top Keywords:-
- Python graphics
- python turtle graphics
- python turtle
- how to make a star using python code
0 Comments
If you have any problem in code write in comments!