Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # декор = 10% от бюджета = 0.1 * бюджета
- # облекло = Брой на статистите * цена за 1 статист
- # отстъпка за облекло -> ако броят на статистите > 150
- # облекло - 15%
- # разходи = декор + облекло
- # проверка дали стига бюджетът
- budget = float(input())
- count_statists = int(input())
- price_clothes_per_statist = float(input())
- price_decor = 0.1 * budget
- price_clothes = count_statists * price_clothes_per_statist
- if count_statists > 150:
- price_clothes = price_clothes - 0.10 * price_clothes
- # price_clothes = 0.9 * price_clothes
- expenses = price_decor + price_clothes
- if expenses > budget:
- # бюджетът не е достатъчен
- print("Not enough money!")
- need_money = expenses - budget
- print(f"Wingard needs {need_money:.2f} leva more.")
- else:
- # бюджетът е достатъчнo
- print('Action!')
- left_money = budget - expenses
- print(f"Wingard starts filming with {left_money:.2f} leva left.")
Advertisement
Add Comment
Please, Sign In to add comment