Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- volume_pool = int(input())
- pipe_1 = int(input())
- pipe_2 = int(input())
- hours = float(input())
- volume_pipe_1 = pipe_1 * hours
- volume_pipe_2 = pipe_2 * hours
- total_litres = volume_pipe_1 + volume_pipe_2
- if total_litres <= volume_pool:
- procent_total_litre = (total_litres / volume_pool)*100
- procent_volume_pipe1 = (volume_pipe_1 /total_litres)* 100
- procent_total_litre_pipe2 = (volume_pipe_2/total_litres) * 100
- print(f"The pool is {procent_total_litre:.2f}% full. Pipe 1: {procent_volume_pipe1:.2f}%. Pipe 2: {procent_total_litre_pipe2:.2f}%.")
- else:
- overflow = total_litres - volume_pool
- print(f"For {hours:.2f} hours the pool overflows with {overflow:.2f} liters.")
Advertisement
Add Comment
Please, Sign In to add comment