Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- day_cash = float(input()) * 5
- day_profit = float(input()) * 5
- cost = float(input())
- gift_price = float(input())
- total = day_cash + day_profit - cost
- if total >= gift_price:
- print(f'Profit: {total:.2f} BGN, the gift has been purchased.')
- else:
- print(f'Insufficient money: {gift_price - total:.2f} BGN.')
- Taрикатско решение:)
- total = (float(input()) + float(input())) * 5 - float(input())
- gift_price = float(input())
- print(f'Insufficient money: {gift_price - total:.2f} BGN.' if total < gift_price
- else f'Profit: {total:.2f} BGN, the gift has been purchased.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement