Advertisement
fumanbest

Salary

Jun 3rd, 2021
1,047
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. num_of_tabs = int(input())
  2. salary = int(input())
  3.  
  4. for i in range(num_of_tabs):
  5.     open_tabs = input()
  6.     if open_tabs == 'Facebook':
  7.         salary -= 150
  8.     elif open_tabs == 'Instagram':
  9.         salary -= 100
  10.     elif open_tabs == 'Reddit':
  11.         salary -= 50
  12.     else:
  13.         salary = salary
  14.  
  15.     if salary <= 0:
  16.         print("You have lost your salary.")
  17.         break
  18. if salary > 0:
  19.     print(salary)
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement