“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 SQUARE IN OUT SPIRAL. Here we have used the screen function for showingSQUARE IN OUT SPIRAL and a pen for drawing the spiral.

PROGRAM:-

import turtle

w = turtle.Screen()
w.title("GoogleGyaan Square in out Spiral")  # Title of the Spiral
w.bgcolor('black')    #Background color of the screen

myPen = turtle.Turtle()
myPen.speed(10)   #Speed of the pen
myPen.color("yellow")   #Color of the pen

side=20
myPen.penup()
myPen.goto(0,0)  #position cursor at the bottom right of the screen
myPen.pendown()

for i in range (1,70):
  myPen.forward(side)
  myPen.left(92)
  side=side+7

myPen.penup()
myPen.goto(500,500)

turtle.done()

OUTPUT:-

Square in out Spiral – SMLOVE