Finding the Area of a Triangle in Python | Python Programming Language 2021

Finding the area of a triangle in python | python programming Language 2021

python program Finding area of a traingle

About the program:

We are now writing a program in python language to find the area of a triangle in a simple way


First, we have to take the three alphabets "A", "B" and "C" as a reference for the three sides of the triangle 

-> we just need to write these alphabets along with the float data type

-> after that, we have to apply the condition to find the area of the triangle



Source code: 

#Finding area of a triangle 

#three sides of a triangle we have taken are a,b and c

a = float(input('enter the first side: '))

b = float(input('enter the second side:' ))

c = float(input('enter the third side: '))

s = (a+b+c)/2 

area = (S(s*a)*(s*b)*(s*c))**0.5

print(' the area of the triangle is 0.2%f ' %area

Expected output:  the area of the triangle is 96.82

Finding area of a triangle python program

image copyrights:

Post a Comment

Previous Post Next Post