Advertisement
bl00dt3ars

05. Excursion Sale

Dec 14th, 2020
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. sea_excursions = int(input())
  2. mountain_excursions = int(input())
  3.  
  4. profit = 0
  5. command = input()
  6.  
  7. while command != "Stop":
  8.     if command == "sea":
  9.         if sea_excursions > 0:
  10.             profit += 680
  11.             sea_excursions -= 1
  12.         else:
  13.             command = input()
  14.             continue
  15.     else:
  16.         if mountain_excursions > 0:
  17.             profit += 499
  18.             mountain_excursions -= 1
  19.         else:
  20.             command = input()
  21.             continue
  22.  
  23.     if sea_excursions > 0 or mountain_excursions > 0:
  24.         command = input()
  25.     else:
  26.         print("Good job! Everything is sold")
  27.         break
  28.  
  29. print(f"Profit: {profit} leva.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement