Python Program to Compute Gross Salary from Basic, DA and HRA
Write Python Program to Compute Gross Salary from Basic, DA and HRA
# Python Program to Compute Gross Salary from Basic, DA and HRA salary = float(input("Enter Basic Salary :--> ")) da_percentage = float(input("Enter DA (perc.) :--> ")) hra_percentage = float(input("Enter HRA (perc.) :--> ")) da = (salary * da_percentage) / 100 hra = (salary * hra_percentage) / 100 gross_salary = salary + da + hra print("Gross salary : ", gross_salary)
Output:
Enter Basic Salary :--> 40000
Enter DA (perc.) :--> 50
Enter HRA (perc.) :--> 10
Gross salary : 64000.0