How to Make Area Calculator in Python | Python Tutorial | Area Calculator

Pubblicato il: 11 ottobre 2020
sul canale di: Local Python
1,348
25

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()


In questa pagina del sito puoi guardare il video online How to Make Area Calculator in Python | Python Tutorial | Area Calculator della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Local Python 11 ottobre 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,348 volte e gli è piaciuto 25 spettatori. Buona visione!