bl00dt3ars

02. Spaceship

Nov 14th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. import math
  2.  
  3. width = float(input())
  4. length = float(input())
  5. height = float(input())
  6. average_height_astronauts = float(input())
  7.  
  8. rocket = width * length * height
  9. rooms = (average_height_astronauts + 0.4) * 2 * 2
  10. available_rooms = math.floor(rocket / rooms)
  11.  
  12. if available_rooms > 10:
  13.     print("The spacecraft is too big.")
  14. elif 3 <= available_rooms <= 10:
  15.     print(f"The spacecraft holds {available_rooms} astronauts.")
  16. else:
  17.     print("The spacecraft is too small.")
Add Comment
Please, Sign In to add comment