Advertisement
Guest User

Harvest

a guest
Feb 25th, 2020
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. X = int(input())
  2. Y = float(input())
  3. Z = int(input())
  4. workers = int(input())
  5.  
  6. Grapes = X * Y
  7. Wine = 40/100 * Grapes/2.5
  8.  
  9. if Wine < Z:
  10.     needed = Z - Wine
  11.     print(f"It will be a tough winter! More {round(needed)} liters wine needed.")
  12. elif Wine > Z:
  13.     remain = Wine - Z
  14.     for_workers = remain/workers
  15.     print(f"Good harvest this year! Total wine: {round(Wine)} liters.")
  16.     print(f"{round(remain)} liters left -> {round(for_workers)} liters per person.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement