Sunday, July 14, 2019

WAP to input the salary of a person and calculate the hra and da according to the following conditions:

conditions:

  • Salary HRA DA
  • 5000-10000 10%       5%
  • 10001-15000 15%       8%


salary = float(input("Enter Salary = "))
print('-'*20)
if (salary >= 5000  and salary <=10000):
print("HRA = " + str((salary * 10)/100))
print("DA = " + str((salary * 5)/100))
elif(salary >= 10001  and salary <=15000):
print("HRA = " + str((salary * 15)/100))
print("DA = " + str((salary * 8)/100))
else:
print(" invalid salary ")

No comments:

Post a Comment