koteshkoeziche

Bakery

Nov 7th, 2020
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. biscuits_per_worker = int(input())
  2. workers = int(input())
  3. competing_factory = int(input())
  4.  
  5. production_per_month = 0
  6.  
  7. for day in range(1, 31):
  8. daily_product = biscuits_per_worker * workers
  9.  
  10. if day % 3 == 0:
  11. daily_product *= 0.75
  12.  
  13. production_per_month += daily_product
  14.  
  15. print(f'You have produced {int(production_per_month)} biscuits for the past month.')
  16.  
  17. difference = abs(production_per_month - competing_factory)
  18. percentage = (difference / competing_factory) * 100
  19.  
  20. if production_per_month >= competing_factory:
  21. print(f'You produce {percentage:.2f} percent more biscuits.')
  22. else:
  23. print(f'You produce {percentage:.2f} percent less biscuits.')
  24.  
  25.  
  26.  
  27.  
  28.  
Advertisement
Add Comment
Please, Sign In to add comment