Advertisement
KNenov96

03.harvest

Jun 5th, 2022
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. import math
  2.  
  3. harvest = int(input())
  4. grapes_kv = float(input())
  5. wine_litres = int(input())
  6. working_people = int(input())
  7.  
  8. production = harvest * grapes_kv
  9. wine_production = (production / 2.5) * 0.4
  10.  
  11. if wine_litres > wine_production:
  12.     print(f"It will be a tough winter! More {math.floor(wine_litres - wine_production)} liters wine needed.")
  13. else:
  14.     print(f"Good harvest this year! Total wine: {math.ceil(wine_production)} liters.")
  15.     print(f"{math.floor(wine_production - wine_litres)} liters left -> {math.ceil((wine_production - wine_litres) / working_people)} liters per person. ")
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement