8000 Program to find area of a triangle when 3 sides are given. · enthuleo/programminginpython.com@d9addc4 · GitHub
[go: up one dir, main page]

Skip to content

Commit d9addc4

Browse files
committed
Program to find area of a triangle when 3 sides are given.
1 parent 4600758 commit d9addc4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

area_of_triangle.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
__author__ = 'Avinash'
2+
3+
a = float(input('Enter first side: '))
4+
b = float(input('Enter second side: '))
5+
c = float(input('Enter third side: '))
6+
7+
s = (a + b + c) / 2
8+
9+
area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
10+
print('The area of the triangle is %0.2f' % area)

0 commit comments

Comments
 (0)
0