Create a program name
“employee.py” and implement the functions DA, HRA, PF,
and ITAX. Create
another program that uses the function of employee module and calculates gross
and net salaries of an employee. Create employee.py
file with following code
#employee.py
def da():
d=int(input("Enter DA"))
return(d)
def hra():
h=int(input("Enter HRA"))
return(h)
def pf():
p=int(input("Enter PF"))
return(p)
def itax():
i=int(input("Enter ITAX"))
return(i)
Calculate.py
file that imports employee module
import employee
basic=int(input("Enter basic salary"))
da=employee.da()
hra=employee.hra()
it=employee.itax()
pf=employee.pf()
gross_salary=da+hra+basic
net_salary=gross_salary-(pf+it)
print("The gross salary of employee is" ,
gross_salary)
print("The net salary of employee is " ,
net_salary)