Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- volume = int(input())
- pipe_1 = int(input())
- pipe_2 = int(input())
- hour = float(input())
- water = (pipe_1 + pipe_2) * hour
- if water <= volume:
- print(f"The pool is{water}% full. Pipe 1:{pipe_1}%. Pipe 2: {pipe_2}%".format(math.trunc(water / volume * 0.01), math.trunc(pipe_1 * water / volume * 0.01), math.trunc(pipe_2 * water / volume * 0.01)) )
- else:
- print(f"For {hours} hours the pool overflow with {volume} litters")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement