16. Python Program to Calculate the gross salary of an Employee.
How does this program work?
- In this program you will learn about how to calculate gross salary of an employee using Python.
- By using given formula we can easily calculate the gross salary.
Here is the code
def cal(bs,da,hra):
gs =bs + da + hra
return gs
bs = int(input("Enter Basic Salary: "))
da = (bs*40)/100
hra = (bs*20)/100
print("Gross Salary is: ",cal(bs,da,hra))