Advertisement
Spocoman

Hair Salon

Feb 20th, 2022
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. target = int(input())
  2. sum = 0
  3.  
  4. while target > sum:
  5.     service = input()
  6.     if service == "closed":
  7.         break
  8.     else:
  9.     person = input()
  10.     if service == "haircut":
  11.         if person == "mens":
  12.             sum += 15
  13.         elif person == "ladies":
  14.             sum += 20
  15.         elif person == "kids":
  16.             sum += 10
  17.  
  18.     elif service == "color":
  19.         if person == "touch up":
  20.             sum += 20
  21.         elif person == "full color":
  22.             sum += 30
  23.  
  24. if sum >= target:
  25.     print("You have reached your target for the day!")
  26. else:
  27.     print(f"Target not reached! You need {target - sum}lv.more.")
  28.  
  29. print(f"Earned money: {sum}lv.")
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement