Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- target_money = int(input())
- command = input()
- target_complete = False
- total_sum = 0
- while command != 'closed':
- current_order = command
- type_order = input()
- if current_order == 'haircut':
- if type_order == 'mens':
- total_sum += 15
- elif type_order == 'ladies':
- total_sum += 20
- else:
- total_sum += 10
- elif current_order == 'color':
- if type_order == 'touch up':
- total_sum += 20
- else:
- total_sum += 30
- if total_sum >= target_money:
- print(f"You have reached your target for the day!")
- target_complete = True
- break
- command = input()
- if not target_complete:
- print(f"Target not reached! You need {target_money-total_sum}lv. more.")
- print(f"Earned money: {total_sum}")
Add Comment
Please, Sign In to add comment