Advertisement
xladomaz

Untitled

Dec 22nd, 2021
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. from math import *
  2.  
  3. tr_a = int(input('Please, input sides for triangle: '))
  4. tr_b = int(input())
  5. tr_c = int(input())
  6.  
  7. tr_p = (tr_a + tr_b + tr_c) / 2
  8. tr_area = sqrt(tr_p * (tr_p - tr_a) * (tr_p - tr_b) * (tr_p - tr_c))
  9.  
  10.  
  11. ra_a = int(input('Please, input 2 sides for rectangle: '))
  12. ra_b = int(input())
  13.  
  14. ra_area = ra_a * ra_b
  15.  
  16.  
  17. ci_r = int(input('Please, input radius for circle: '))
  18.  
  19. ci_area = pi * ci_r ** 2
  20.  
  21. 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