What is Python Program to find Perimeter of a Rectangle

Question

Perimeter = AB + BC + CD + DA => L + B + L + B => 2 * (L + B)

Hence we can say that the perimeter of a rectangle can be calculated by the formula twice the sum of length and breadth.

Code to Calculate the Perimeter of Rectangle

Python Code:

l = 5
b = 3
perimeter = 2 * (l + b)
print (“Perimeter = “, perimeter)

0
Anonymous 3 years 0 Answers 441 views 0

Leave an answer

Browse
Browse