Header Ads

Love coding ❤️ Print Rainbow Benzene using python II Coding Status

This tutorial is going to tell you how to make Print Rainbow Benzene using python and you will also get the source code and till now you have not visited our YouTube channel 'Mr Code Box', so hurry up, let's start


let's start 

Video Tutorial 



You can visit our YouTube channel 'Mr Code Box' and watch the video tutorial.






Source Code;)


# import turtle library
import turtle            
colors = [ "red","purple","blue","green","orange","yellow"]
my_pen = turtle.Pen()
turtle.bgcolor("black")
for x in range(360):
   my_pen.pencolor(colors[x % 6])
   my_pen.width(x/100 + 1)
   my_pen.forward(x)
   my_pen.left(59)




Output;)




No comments

Powered by Blogger.