How to find out Area of triangle in python
Answers
Answered by
2
Language used: Python Programming
Program:
import math
#Using heron's formula, let us find the area of the triangle
#Take the lengths of the sides of the triangle as inputs
a = int(input())
b = int(input())
c = int(input())
#Calculating parameter
s = (a+b+c)/2
#Calculating the area
area = math.sqrt((s)*(s-a)*(s-b)*(s-c))
print("Area of a triangle = ", area)
Input:
4
6
8
Output:
Area of a triangle = 11.61895003862225
Learn more:
Your friend and you made a list of topics and both of them voted if they like or dislike the topic. They wrote 0 to denote dislike and 1 to denote like..
brainly.in/question/44681897
Indentation is must in python. Know more about it.
brainly.in/question/1773116
Similar questions