Write a program to input basic salary of an employee and calculate its Gross salary
according to following:
Basic Salary <= 10000 : HRA = 20%, DA = 80%
Basic Salary <= 20000 : HRA = 25%, DA = 90%
Basic Salary > 20000 : HRA = 30%, DA = 95%
Answers
Answered by
7
choice = "Yes"
while choice == "Yes":
ba = float(input("Enter your basic salary: "))
print()
if ba <= 10000:
hra = (20/100)*ba
da = (80/100)*ba
print(ba + hra + da, "is your gross salary.")
elif ba <= 20000:
hra = (25/100)*ba
da = (90/100)*ba
print(ba + hra + da, "is your gross salary.")
elif ba > 20000:
hra = (30/100)*ba
da = (95/100)*ba
print(ba + hra + da, "is your gross salary.")
print()
choice = input("Next worker? [Yes/No]: ")
print()
Attachments:
Equestriadash:
Thanks for the Brainliest!
Answered by
3
the salary of an employee is 20,000
Similar questions
English,
3 months ago
Social Sciences,
3 months ago
Social Sciences,
7 months ago
Math,
11 months ago
Sociology,
11 months ago