Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 02. Spaceship
- import math
- width = float(input())
- length = float(input())
- height = float(input())
- averageHeight = float(input())
- spaceShipVolume = width * length * height
- roomVolume = (averageHeight + 0.40) * 2 * 2
- spaceShipPlaces = math.floor(spaceShipVolume / roomVolume)
- if spaceShipPlaces >= 3 and spaceShipPlaces <= 10:
- print(f"The spacecraft holds {spaceShipPlaces} astronauts.")
- elif spaceShipPlaces < 3:
- print(f"The spacecraft is too small.")
- elif spaceShipPlaces > 10:
- print(f"The spacecraft is too big.")
Add Comment
Please, Sign In to add comment