muhammad_nasif

TASK_05

Apr 13th, 2021
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. def calculate_tax(age, salary, job):
  2.     age = int(age)
  3.     salary = int(salary)
  4.     if age<18:
  5.         return 0
  6.     elif job == "PRESIDENT":
  7.         return 0
  8.     elif salary<10000:
  9.         return 0
  10.     elif salary>=10000 and salary<=20000:
  11.         return salary*0.05
  12.     elif salary>20000:
  13.         return salary*0.1
  14.  
  15. age = input()
  16. sal = input()
  17. job = input()
  18. print(calculate_tax(age,sal,job))
Advertisement
Add Comment
Please, Sign In to add comment