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

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials 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 Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz