Python Code

 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)







Post a Comment

[blogger]

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget