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()
En esta página del sitio puede ver el video en línea How to Make Area Calculator in Python | Python Tutorial | Area Calculator de Duración hora minuto segunda en buena calidad , que subió el usuario Local Python 11 octubre 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 1,348 veces y le gustó 25 a los espectadores. Disfruta viendo!