Advertisement
simeonshopov

Pool pipes

Sep 10th, 2019
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. v=int(input())
  2. p1=int(input())
  3. p2=int(input())
  4. n=float(input())
  5. debit=p1*n+p2*n
  6. if debit<v:
  7.   print(f"The pool is {((debit/v)*100):.2f}% full. Pipe 1: {(((n*p1)/debit)*100):.2f}%. Pipe 2: {(((n*p2)/debit)*100):.2f}%.")
  8. elif debit>v:
  9.   print(f"For {n:.2f} hours the pool overflows with {(debit-v):.2f} liters.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement