Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- field = int(input()) # 650
- harvest = float(input()) # 2
- liters_wine = int(input()) # 175
- workers = int(input()) # 3
- grapes = field * harvest # 1300
- wine = (grapes * 0.40) / 2.5
- left = math.ceil(wine - liters_wine)
- per_person = math.ceil(left / workers)
- need = abs(math.floor(left))
- if wine >= liters_wine:
- print(f'Good harvest this year! Total wine: {wine:.0f} liters.\n{left:.0f} liters left -> {per_person:.0f} liters per person.')
- else:
- print(f'It will be a tough winter! More {need:.0f} liters wine needed.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement