Ddimov90

house_painting_07_03

Sep 21st, 2025
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | Source Code | 0 0
  1. height = float(input())
  2. width = float(input())
  3. roof_height = float(input())
  4.  
  5. window_area = 1.5 * 1.5
  6. door_area = 1.2 * 2
  7.  
  8. big_walls = height * width * 2 - 2 * window_area
  9. small_walls = height * height * 2 - door_area
  10.  
  11. roof_rectangle = height * width * 2
  12. roof_triangles = height * roof_height / 2 * 2
  13.  
  14. total_walls = big_walls + small_walls
  15. total_roof = roof_rectangle + roof_triangles
  16.  
  17. paint_walls = total_walls / 3.4
  18. paint_roof = total_roof / 4.3
  19.  
  20. print(f"{paint_walls:.2f}")
  21. print(f"{paint_roof:.2f}")
  22.  
Advertisement
Add Comment
Please, Sign In to add comment