Advertisement
Merucial

Space Ship

Mar 22nd, 2020
496
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. import math
  2.  
  3. rocket_wight = float(input())
  4. rocket_lenght = float(input())
  5. rocket_height = float(input())
  6. avarage_austro_height = float(input())
  7.  
  8.  
  9. rocket_area = rocket_height * rocket_lenght * rocket_wight
  10. room_area = (avarage_austro_height + 0.40) * 2 * 2
  11. max_austronauts = math.floor(rocket_area / room_area)
  12.  
  13. if max_austronauts > 3 and max_austronauts  < 10:
  14.      print(f'The spacecraft holds {max_austronauts} astronauts.')
  15. elif max_austronauts < 3:
  16.     print('The spacecraft is too small.')
  17. elif max_austronauts >= 10:
  18.      print("The spacecraft is too big.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement