Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- from math import sqrt
- a = float(input('a = '))
- b = float(input('b = '))
- c = float(input('c = '))
- if a < b + c and b < c + a and c < a + b:
- s = (a + b + c) / 2
- print(f'S = {sqrt(s * (s - a) * (s - b) * (s - c))}')
- else:
- print(-1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement