Advertisement
veronikaaa86

05. Salary

May 29th, 2022
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. count_tabs = int(input())
  2. salary = int(input())
  3.  
  4. copy_salary = salary
  5.  
  6. for i in range(1, count_tabs + 1):
  7. current_tab = input()
  8.  
  9. if current_tab == "Facebook":
  10. copy_salary = copy_salary - 150
  11. elif current_tab == "Instagram":
  12. copy_salary = copy_salary - 100
  13. elif current_tab == "Reddit":
  14. copy_salary = copy_salary - 50
  15.  
  16. if copy_salary <= 0:
  17. break
  18.  
  19. if copy_salary <= 0:
  20. print("You have lost your salary.")
  21. else:
  22. print(copy_salary)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement