𝐅𝐨𝐥𝐥𝐨𝐰 𝐦𝐞 𝐨𝐧 𝐈𝐧𝐬𝐭𝐚𝐠𝐫𝐚𝐦 : @𝐀𝐦𝐫𝐢𝐭𝐞𝐬𝐡𝐦𝐢𝐬𝐡𝐫𝐚𝟓𝟏𝟐 Twitter: @amriteshmishr14
Python Code:
Area and perimeter of rectangle
l=int(input("Length : "))
w=int(input("Width : "))
area=l*w
perimeter=2*(l+w)
print("Area of Rectangle : ",area)
print("Perimeter of Rectangle : ",perimeter)
To find Area and Perimeter of a Square
side = int (input ("Enter the side of a square: " ))
area = side*side #Formula for Area of square
perimeter = 4*side #Formula for Perimeter of square
print("Area of a square : ",area)
print("Perimeter of a square : ",perimeter)
Python program to find the
area and perimeter of circle in python
# Initialising the value of PI
PI = 3.14
# Getting input from user
R = float(input("Enter radius of the circle: "))
# Finding the area and perimeter of the circle
area = (PI*R*R)
perimeter = (2*PI*R)
# Printing the area and perimeter of the circle
print("The area of circle is", area)
print("The perimeter of circle is", perimeter)