Area Of 2D Figures
Area Of Given 2D Figures
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
print("-----------------------------------MENU---------------------------------\n(1) Area of Square\n(2) Area of Circle\n(3) Area of Triangle\n(4) Area of Rectangle\n(5) Exit")
x = int(input("Enter Your Choice:-"))
if x==1:
s=int(input("Enter The side of Square:-"))
a=s*s
elif x==2:
r=int(input("Enter the radius of Circle:-"))
a=3.14*r*r
elif x==3:
b=int(input("Enter the Base:-"))
h=int(input("Enter the Height:-"))
a=1/2*b*h
elif x==4:
l=int(input("Enter the Length:-"))
b=int(input("Enter the Breadth:-"))
a=l*b
elif x ==5:
exit()
else:
print("WRONG INPUT")
print(a)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Area Of 2D Figures
Reviewed by Ratin Tech
on
November 11, 2018
Rating:
No comments: