ElenaSokol

Untitled

Oct 11th, 2021
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. number_of_tabs = int(input())
  2. salary = float(input())
  3.  
  4. for n in range(number_of_tabs):
  5.     current_tab = input()
  6.     if current_tab == "Facebook":
  7.         salary -= 150
  8.     elif current_tab == "Instagram":
  9.         salary -= 100
  10.     elif current_tab == "Reddit":
  11.         salary -= 50
  12.     else:
  13.         salary = salary
  14.     if salary <= 0:
  15.         print("You have lost your salary.")
  16. if salary > 0:
  17.     print(f"{salary:.0f}")
  18.  
Advertisement
Add Comment
Please, Sign In to add comment