Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import *
- tr_a = int(input('Please, input sides for triangle: '))
- tr_b = int(input())
- tr_c = int(input())
- tr_p = (tr_a + tr_b + tr_c) / 2
- tr_area = sqrt(tr_p * (tr_p - tr_a) * (tr_p - tr_b) * (tr_p - tr_c))
- ra_a = int(input('Please, input 2 sides for rectangle: '))
- ra_b = int(input())
- ra_area = ra_a * ra_b
- ci_r = int(input('Please, input radius for circle: '))
- ci_area = pi * ci_r ** 2
- print("The areas are:\n Circle={:.2f}, Triangle={:.2f}, Quadrange={:.2f}".format(ci_area, tr_area, ra_area))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement