Advertisement
SetKaung

Quiz2_Set2

Feb 18th, 2024
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.98 KB | None | 0 0
  1. monthly_wage = int(input('Enter the monthly wage: '))
  2. work_experience = int(input('Enter working expereince (Months): '))
  3.  
  4. bonus = 0
  5.  
  6. if work_experience >= 12:
  7.     if 1*12 <= work_experience <= 3*12:
  8.         bonus = 1*monthly_wage
  9.     elif 4*12 <= work_experience <= 7*12:
  10.         bonus = 2*monthly_wage
  11.     elif 8*12 <= work_experience <= 10*12:
  12.         bonus = 3 * monthly_wage
  13.     elif work_experience > 10*12:
  14.         bonus = 5 * monthly_wage
  15. elif work_experience >= 6:
  16.     bonus = monthly_wage*0.5
  17.  
  18. salary = monthly_wage + bonus
  19.  
  20. if salary >= 30000:
  21.     tax = 0.07
  22. elif salary >= 10000:
  23.     tax = 0.05
  24. else:
  25.     tax = 0
  26.  
  27. tax_amount = salary*tax
  28. net_salary = salary - tax_amount
  29.  
  30. years = work_experience // 12
  31. months = work_experience - (years*12)
  32.  
  33. print(f'Service period in the company = {years} Years {months} Months')
  34. print(f'Bonus = {bonus}')
  35. print(f'Salary = {salary}')
  36. print(f'Tax ({int(tax*100)}%) = {tax_amount:.0f}')
  37. print(f'Net Salary = {net_salary}')
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement