# Python program to calculate Area of a Triangle

In this tutorial we will learn how to calculate area of a triangle. Here we will use Heron’s Formula to calculate area of triangle.

**Formula :**

**Area of a Triangle = √(s* (s-a)*(s-b)*(s-c))**

**Semi Perimeter(s)**

**s = (a + b + c)/2**

**Python program to calculate Area of a Triangle source code :**

a = float(input('Enter first side of Triangle: ')) b = float(input('Enter second side of Triangle: ')) c = float(input('Enter third side of Triangle: ')) # calculate semi-perimeter s = (a + b + c) / 2 # calculating area # using Heron's Formula area = (s*(s-a)*(s-b)*(s-c)) ** 0.5 print('Area of triangle is %0.2f' %area)

## Output :

Enter first side of Triangle: 5 Enter second side of Triangle: 9 Enter third side of Triangle: 6 Area of triangle is 14.14