Advertisement
AKoo7
Jan 10th, 2023
36
0
Never
This is comment for paste Untitled
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. num = int(input())
  2. salary = int(input())
  3.  
  4. Facebook = 150
  5. Instagram = 100
  6. Reddit = 50
  7.  
  8.  
  9. for i in range(1, num + 1):
  10.    
  11.     if salary <= 0:
  12.         print("You have lost your salary.")
  13.         break
  14.  
  15.     sites = input()
  16.  
  17.     if sites == "Facebook":
  18.         salary -= Facebook
  19.     elif sites == "Instagram":
  20.         salary -= Instagram
  21.     elif sites == "Reddit":
  22.         salary -= Reddit
  23.  
  24. if salary > 0:
  25.     print(salary)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement