Computer Science, asked by psohini360, 5 months ago

3) write a program in python
to calculate the gross salary of an employee. Take
the salary as input from the user . If the salary is more
than 20,000 give him/her a 5% DA and a 2% HRA.if the salary
is less than or equal to 20000
of the salary
give him/her
a 2% HRA and no DA.​

Answers

Answered by lalitnit
0

Answer:

If the salary is more than 20,000 give him/her a 5% DA and a 2% HRA.

If the salary is less than or equal to 20000 of the salary

give him/her a 2% HRA and no DA.

Calculate Gross Salary Python Program

Basic_Salary = input("Enter Basic Salary :")

DA = (Basic_Salary * 40) / 100

HRA = (Basic_Salary * 20) / 100

Gross_Salary = Basic_Salary + DA + HRA

print "\n\nDearness Allowance 40 % of Basic Salary :" , DA

print "House Rent 20 % of Basic Salary :" , HRA

print "Gross Salary :" , Gross_Salary

Similar questions