“Turtle” is a Python feature which is used for drawing board, it uses multiple command to draw spirals. This comes packed with the standard Python package and need not be installed externally using the pip package.
This a python program in which we are importing turtle. Turtle store all the method of the spiral.
In this program we are making a MAGICAL SPIRAL HELIX. Here we have used the screen function for showingMAGICAL SPIRAL HELIX and a pen for drawing the spiral.
import turtle w = turtle.Screen() w.title("GoogleGyaan Spiral Helix") # Provide title to the Spiral Helix w.bgcolor('pink') # background color to the helix. #list of colors for the spiral colors=['red', 'green', 'yellow', 'purple', 'orange','blue'] t = turtle.Pen() t.speed(12) for x in range(360): color=colors[x %len(colors)] t.pencolor(color) t.width(x / 100 +1) t.forward(x) t.left(59) turtle.done()