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()
Auf dieser Seite können Sie das Online-Video How to Make Area Calculator in Python | Python Tutorial | Area Calculator mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Local Python 11 Oktober 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,348 Mal angesehen und es wurde von 25 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!