# Draw Square in Python Turtle

Hi developers, today you will see that how to draw a square from Turtle model in Python step by step. Python turtle allows you to direct different directions like rectangle, circle, cone and more. And turtle is an inbuilt Python Module. So to use it first of all you need some Python libraries to draw this square in python.

So now let's see how you can Draw Square in Python Turtle with less code. So if you want to draw the square you can just copy the code given below and run it in your code editor to see the output.

You can also change the sideLength and angles to make changes in this. Now check two method to Draw Square in Python. And using this you can make it more interesting and enjoyable. Also I hope you will enjoy it.

## Let's see the code to Draw Square in Python Turtle

### 1. First Approach to Draw Square in Python Turtle

# Draw Square in Python Turtle
import turtle
t = turtle.Turtle()

sideLength = int(input("Enter the length of the side of the Square: "))

#drawing the first side of square
t.forward(sideLength) #Forward Turtle by sideLength units
t.left(90) #Turn turtle by 90 degree

#drawing the second side of square
t.forward(sideLength) #Forward Turtle by sideLength units
t.left(90) #Turn turtle by 90 degree

#drawing the third side of square
t.forward(sideLength) #Forward Turtle by sideLength units
t.left(90) #Turn turtle by 90 degree

#drawing the fourth side of square
t.forward(sideLength) #Forward Turtle by sideLength units
t.left(90) #Turn turtle by 90 degree

### 2. Second approach to Draw Square in Python Turtle

import turtle
#Set up the turtle screen
screen = turtle.Screen()
screen.title("Drawing Square in Python using Turtle")

# Creating a turtle name
drawSquare = turtle.Turtle()

# Increase the size of the square
sideLength = 100

# Draw a square
for _ in range(4):
drawSquare.forward(sideLength)
drawSquare.left(90)

# Keep the window open until closed by the user
turtle.done()