Develop a salary sheet of an employee by getting the basic salary from the user and calculating the below accordingly using Python.
HRA=10% of basic salary, TA=20% of basic salary, DA=30% of basic salary,
Gross income= Basic Salary+HRA+TA+DA, Tax= 12% of gross income,
Net salary= Gross income-tax
Answers
Answered by
4
Answer:
basic_salary = int(input("Please enter your salary: "))
hra = 0.1*basic_salary
ta = 0.2*basic_salary
da = 0.3*basic_salary
gross_income = basic_salary+hra+ta+da
tax = 0.12*gross_income
net_salary = gross_income-tax
print(f"""
HRA = {hra}
TA = {ta}
DA = {da}
Gross Income = {gross_income}
Tax = {tax}
Net salary = {net_salary}""")
Similar questions