Answers for "program to calculate the area of triangle using heron's formula in python."

0

program to calculate the area of triangle using heron's formula in python.

Three sides of the triangle is a, b and c:
a = float(input('Enter first side: '))
b = float(input('Enter second side: '))
c = float(input('Enter third side: '))
# calculate the semi-perimeter.
s = (a + b + c) / 2.
# calculate the area.
area = (s*(s-a)*(s-b)*(s-c)) ** 0.5.
Posted by: Guest on March-03-2022

Code answers related to "program to calculate the area of triangle using heron's formula in python."

Python Answers by Framework

Browse Popular Code Answers by Language