aneliabogeva

Spaceship

Jun 10th, 2019
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import math
  2.  
  3. ship_wigh = float(input())
  4. ship_lenght = float(input())
  5. ship_heigh = float(input())
  6.  
  7. astronaphts_height = float(input())
  8.  
  9. volume_ship = ship_wigh * ship_lenght * ship_heigh
  10. volume_room = 2 * 2 * (astronaphts_height + 0.40)
  11.  
  12. space = math.floor(volume_ship / volume_room)
  13.  
  14. if space < 3:
  15. print(f"The spacecraft is too small.")
  16. elif space >= 3 and space <= 10:
  17. print(f"The spacecraft holds {space} astronauts.")
  18. else:
  19. print("The spacecraft is too big.")
Advertisement
Add Comment
Please, Sign In to add comment