Drawing rainbow benzene using turtle graphics



import turtle

color=['red','green','blue','orange','yellow','purple']#list of colors
t=turtle.Pen()
turtle.bgcolor('white')#setting background color white
for x in range(360):
t.pencolor(color[x%6])#to change the pen color dynamically retriveing from color list
t.width(x/100+1)#to change the line width 
t.forward(x)#to draw the line 
t.left(59)#to turn the pen in the given angle
pass
i=input("exit")