Programming Examples

Python program to accept three side of triangle and find its area by using Herons Formula


Write  a python program to accept 3 side of triangle and find its area by using Heron’s Formula

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

import math
a=float(input("Enter the Side 1 "))
b=float(input("Enter the Side 2 "))
c=float(input("Enter the Side 3 "))
s=(a+b+c)/2
area=math.sqrt(s*(s-a)*(s-b)*(s-c))
print("Area of Triangle is : ",area)
Output

Enter the Side 1 5

Enter the Side 2 4

Enter the Side 3 3

Area of Triangle is :  6.0

Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad