Python Program to Find Perimeter of Square

Square is a planar shape which have all of its sides being equal like a closed shape having sides as 4, 4, 4, 4 will be a Square. Mathematically perimeter of Square is defined as four times of side of square. Simple if side of square is s then perimeter of square will be 4 * s.

Let’s Program this as Python Code for Finding Perimeter of Square.

# Calculating Perimeter of Square Using Python

s = float(input("Enter Side of Square => "))

# Perimeter of Square
perimeter_of_square = 4 * s

# Printing out parameter of Rectangle
print("Perimeter of Square is =>", perimeter_of_square)

Output of Above Code

Enter Side of Square => 5
Perimeter of Square is => 20.0


Hi, there I'm founder of ComputerScienceHub(Started this to bring useful Computer Science information just at one place). Personally I've been doing JavaScript, Python development since 2015(Been long) - Worked upon couple of Web Development Projects, Did some Data Science stuff using Python. Nowadays primarily I work as Freelance JavaScript Developer(Web Developer) and on side-by-side managing team of Computer Science specialists at

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts