Advertisement
BbJLeB

07. Salary

May 21st, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. # 07. Salary
  2.  
  3. n = int(input())
  4. salary = int(input())
  5. facebook = 150
  6. instagram = 100
  7. reddit = 50
  8. amercement = 0
  9.  
  10. for i in range(n):
  11.     website = input()
  12.     if website == "Facebook":
  13.         salary -= facebook
  14.     elif website == "Instagram":
  15.         salary -= instagram
  16.     elif website == "Reddit":
  17.         salary -= reddit
  18.     if salary == 0:
  19.         print(f"You have lost your salary.")
  20.         break
  21. else:
  22.     print(f"{salary}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement