Write a program in python language that calculates the
salary of an employee who works under an hourly wage contract in a
company. To read his name, the working hours of the month, his
hourly wage and whether he is married or unmarried.
The reservations made to him depend on the amount of his salary. If
the salary is up to € 1000 per month, it has 15% reservations,
while otherwise it has 25% reservations. Also, if he is married, he
has an allowance of € 50.
name=input()
hours=int(input())
wage=int(input())
status=input()
x=hours*wage
if x<1000:
if status=="married":
salary=x-(0.15*x)+50
print(salary)
else:
salary=x-(0.15*x)
print(salary)
else:
if status=="married":
salary=x-(0.25*x)+50
print(salary)
else:
salary=x-(0.25*x)
print(salary)
This is the program to calculate salary of an employee.Use simple if elif to solve this problem
i think it will hep you
Get Answers For Free
Most questions answered within 1 hours.