Advertisement
simeonshopov

Club

Oct 10th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. profit = float(input())
  2. order_price = 0
  3. income = 0
  4.  
  5.  
  6. while profit > income:
  7.   drink = input()
  8.   if drink  == "Party!":
  9.     break
  10.   else:
  11.     quantity = int(input())
  12.     order_price = len(drink) * quantity
  13.     if order_price % 2 != 0:
  14.       order_price *= 0.75
  15.     income += order_price
  16.  
  17. if income >= profit:
  18.   print("Target acquired.")
  19.   print(f"Club income - {income:.2f} leva.")
  20. else:
  21.   print(f"We need {(profit - income):.2f} leva more.")
  22.   print(f"Club income - {income:.2f} leva.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement