Advertisement
Spocoman

Bracelet Stand

Jan 6th, 2022
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. day_cash = float(input()) * 5
  2. day_profit = float(input()) * 5
  3. cost = float(input())
  4. gift_price = float(input())
  5. total = day_cash + day_profit - cost
  6. if total >= gift_price:
  7.     print(f'Profit: {total:.2f} BGN, the gift has been purchased.')
  8. else:
  9.     print(f'Insufficient money: {gift_price - total:.2f} BGN.')
  10.  
  11.  
  12.  
  13. Taрикатско решение:)
  14.  
  15. total = (float(input()) + float(input())) * 5 - float(input())
  16. gift_price = float(input())
  17. print(f'Insufficient money: {gift_price - total:.2f} BGN.' if total < gift_price
  18.       else f'Profit: {total:.2f} BGN, the gift has been purchased.')
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement