Python, Python Code

Python Program to Calculate the Area of a Triangle

Less than a minute to read

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


Leave a Reply

Your email address will not be published. Required fields are marked *

Sign up for our Newsletter

Join our newsletter and get resources, curated content, and design inspiration delivered straight to your inbox.

Related Posts