Advertisement
pacho_the_python

Untitled

Jun 24th, 2023
841
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.82 KB | None | 0 0
  1. maiden_party_budget = float(input())
  2. love_letters = int(input())
  3. roses = int(input())
  4. key_holders = int(input())
  5. pictures = int(input())
  6. surprise_luck = int(input())
  7.  
  8. letters_price = love_letters * 0.60
  9. roses_price = roses * 7.20
  10. key_holder_price = key_holders * 3.60
  11. surprise_luck_price = surprise_luck * 22
  12. pictures_price = pictures * 18.20
  13. product_number = love_letters + roses + key_holders + pictures + surprise_luck
  14. money = letters_price + roses_price + key_holder_price + surprise_luck_price + pictures_price
  15.  
  16. if product_number > 25:
  17.     money = money - money * 0.35
  18.  
  19. tax = money * 0.10
  20.  
  21. profit = money - tax
  22.  
  23. difference = abs(profit - maiden_party_budget)
  24.  
  25. if profit >= maiden_party_budget:
  26.     print(f"Yes! {difference:.2f} lv left.")
  27. else:
  28.     print(f"Not enough money! {difference:.2f} lv needed.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement