| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/seeditsolution/pythonprogram/master/AreaTriangle | [Back] [Original] |
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
print('The area of the triangle is %0.2f' %area)
| Web Proxy Viewer | New URL | Original Page |