Advertisement
desislava_topuzakova

06. Godzilla vs. Kong

Apr 26th, 2020
874
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.03 KB | None | 0 0
  1. # разходи => декор и обекла
  2. # декор = 10 % от бюджета
  3. # облекло = бр. статисти * цена за ед.костюм
  4. # проверка за остъпка
  5. # разходи = декор + обекло
  6. # проверка дали бюджетът е достатъчен
  7.  
  8. budget = float(input())
  9. count_statists = int(input())
  10. price_per_statist = float(input())
  11.  
  12. decor = 0.1 * budget
  13. clothes = count_statists * price_per_statist
  14.  
  15. if count_statists > 150:
  16.     clothes = clothes - 0.10 * clothes #0.9 * clothes
  17.  
  18. expenses = decor + clothes
  19.  
  20. # ако бюджетът е достатъчен -> budget >= expenses
  21. if budget >= expenses:
  22.     print('Action!')
  23.     left_money = budget - expenses
  24.     print(f'Wingard starts filming with {left_money:.2f} leva left.')
  25. # ако бюджетът не е достатъчен -> бюджетът < разходите
  26. else:
  27.     print('Not enough money!')
  28.     need_money = expenses - budget
  29.     print(f'Wingard needs {need_money:.2f} leva more.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement