In this post, you will learn how to find the area of triangle in Python. There are several ways to calculate the area of a triangle. Here, we will discuss all possible methods to write a Python program to calculate the area of a triangle.
print("PROGRAMME 2 FOR AREA OF A TRIANGLE ")
a=float(input("ENTER THE BASE VALUE(in cms)\n"))
b=float(input("ENTER THE HEIGHT VALUE(in cms)\n"))
c = 0.5*a*b
print("THE AREA OF THE TRAINGLE WITH HEIGHT " + str(b) + " & BASE " + str(a) + " IS " + str(c) + " cm^2" )
Output Below
