Sichanov

dsa

Jan 15th, 2021
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. x = float(input())
  2. y = float(input())
  3. h = float(input())
  4.  
  5. door = 1.2 * 2
  6. window = 1.5 * 1.5
  7.  
  8. sideA1 = x * x - door
  9. sideA2 = x * x
  10. sideB1 = x * y - window
  11. sideB2 = sideB1
  12.  
  13. sideC1 = x * y
  14. sideC2 = sideC1
  15.  
  16. sideD1 = (x * h) / 2
  17. sideD2 = sideD1
  18.  
  19.  
  20. green = (sideA1 + sideA2 + sideB1 + sideB2) / 3.4
  21. red = (sideC1 + sideC2 + sideD1 + sideD2) / 4.3
  22. print(f'{green:.2f}')
  23. print(f'{red:.2f}')
  24.  
Advertisement
Add Comment
Please, Sign In to add comment