bl00dt3ars

05. Hair Salon

Nov 21st, 2020 (edited)
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1. target = int(input())
  2. income = 0
  3. command = input()
  4.  
  5. while command != "closed":
  6.     type = input()
  7.     if command == "haircut":
  8.         if type == "mens":
  9.             income += 15
  10.         elif type == "ladies":
  11.             income += 20
  12.         else:
  13.             income += 10
  14.     else:
  15.         if type == "touch up":
  16.             income += 20
  17.         else:
  18.             income += 30
  19.     if income >= target:
  20.         print("You have reached your target for the day!")
  21.         break
  22.     command = input()
  23. else:
  24.     print(f"Target not reached! You need {target - income}lv. more.")
  25. print(f"Earned money: {income}lv.")
Add Comment
Please, Sign In to add comment