In this post, we will see how to calculate area of triange and print it in Python.
Calculate area of the triangle given three sides.
You can calcualte area of the traingle using Haron’s formula.
Here is simple python program to calculate area of the tringle.
# Three sides of triangle a=10 b=20 c=15 s=(a+b+c)/2 area=(s*(s-a)*(s-b)*(s-c))**0.5 print("Area of the triangle is: ",area)
That’s about calculating area of triange in python.