Rainbow benzene using Python turtle Graphics


Hello friends, Source code to draw a Rainbow benzene using Python turtle Graphics is given below - 

Rainbow Benzene


Source Code:-

# @only.python

import turtle 


colors = ['red', 'purple', 'blue', 'green', 'orange', 'yellow'] 


t = turtle.Pen() 


turtle.bgcolor('black') 


for x in range(360): 


    t.pencolor(colors[x%6]) 


    t.width(x/100 + 1) 


    t.forward(x) 


    t.left(59)



OUTPUT:-  Tap here to see output


For more codes follow @only.python on Instagram






Comments

Popular posts from this blog

Draw Virat Kohli's Cartoon face using python turtle graphics

Wish Happy Friendship Day using Python turtle graphics

Draw Shinchan using Turtle graphics in your Mobile phone 😱