Guest User

Untitled

a guest
Jul 28th, 2021
69
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. collection = input().split("|")
  2. budget = float(input())
  3. bought = []
  4. profit = 0
  5. money = 0
  6. for el in collection:
  7.     item, price = el.split("->")
  8.     price = float(price)
  9.     if item == "Clothes" and price > 50.00:
  10.         continue
  11.     if item == "Shoes" and price > 35.00:
  12.         continue
  13.     if item == "Accessories" and price > 20.50:
  14.         continue
  15.     if price > budget:
  16.         continue
  17.     budget -= price
  18.     print(f"{price * 1.4:.2f}", end=' ')#print(str(round(price * 1.4, 2)), end=" ")
  19.     profit += price * 0.4#profit += round(price * 0.4, 2)
  20.     money += price * 1.4#money += round(price * 1.4, 2)
  21. print()
  22. print(f"Profit: {profit:.2f}")#print(f"Profit: {profit}")
  23. if (budget + money) >= 150:
  24.     print("Hello, France!")
  25. else:
  26.     print("Time to go.")
  27.  
RAW Paste Data