Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. ship_width = float(input())
  2. ship_length = float(input())
  3. ship_height = float(input())
  4. average_astronaut_height = float(input())
  5.  
  6. ship_volume = ship_height*ship_length*ship_width
  7. room_volume = (average_astronaut_height + 0.40) * 2 * 2
  8.  
  9. number_of_astronauts = round(ship_volume / room_volume)
  10.  
  11. if number_of_astronauts < 3:
  12.     print("The spacecraft is too small.")
  13. elif number_of_astronauts > 10:
  14.     print("The spacecraft is too big.")
  15. else:
  16.     print(f'The spacecraft holds {number_of_astronauts} astronauts.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement