It is a simple code to make shape area calculator : square, rectangle, triangle, circle..you can add more on these : The code used :
#AreaCalculator in Python
def square():
sidesq = float(input("Side of the Square :"))
areasq = sidesq * sidesq
print("Area of the Square : ", areasq)
def rectangle():
length = float(input("Input the length of the Rectangle: "))
breadth =float(input("Input the breadth of the Rectangle: "))
arearectangle = length * breadth
print("Area of the Rectangle : ", arearectangle)
def triangle():
height = float(input("Input the Value of the Height:"))
base = float(input("Input the base of the triangle :"))
areatriangle = 0.5 * height * base
print("Area of the Triangle : ", areatriangle)
def circle():
radius = float(input("Input the Radius of The Circle :"))
areacircle = 3.14 * radius * radius
print("Area of the Circle : ", areacircle)
print(" [ square, circle, triangle, rectangle or interest] ")
choice = str(input("What you want to Find?"))
if choice == "square":
square()
elif choice == "rectangle":
rectangle()
elif choice == "triangle":
triangle()
else:
circle()
On this page of the site you can watch the video online How to Make Area Calculator in Python | Python Tutorial | Area Calculator with a duration of hours minute second in good quality, which was uploaded by the user Local Python 11 October 2020, share the link with friends and acquaintances, this video has already been watched 1,348 times on youtube and it was liked by 25 viewers. Enjoy your viewing!