Advertisement
GalinaKG

Untitled

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