Advertisement
simeonshopov

Biscuits Factory

Jan 22nd, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. import math
  2.  
  3. bis_worker_day = int(input())
  4. worker_count = int(input())
  5. other_factory = int(input())
  6. my_factory = 0
  7.  
  8.  
  9. for day in range(1, 31):
  10.     if day % 3 == 0:
  11.         my_factory += math.floor(worker_count * (bis_worker_day * 0.75))
  12.     else:
  13.         my_factory += worker_count * bis_worker_day
  14.  
  15. print(f'You have produced {my_factory} biscuits for the past month.')
  16. if my_factory > other_factory:
  17.     diff = ((my_factory - other_factory) / other_factory) * 100
  18.     print(f'You produce {diff:.2f} percent more biscuits.')
  19. else:
  20.     diff = ((other_factory - my_factory) / other_factory) * 100
  21.     print(f'You produce {diff:.2f} percent less biscuits.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement