Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = str(raw_input('figure '))
- if s == 'rect':
- a = int(input('a '))
- b = int(input('b '))
- print(a * b)
- elif s == 'circ':
- r = int(input('r '))
- print(3.14 * r **2)
- elif s == 'triang':
- a = int(input('a '))
- b = int(input('b '))
- c = int(input('c '))
- p = (a + b +c)/2.0
- print((p*(p - a)*(p - b)*(p - c))**0.5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement