A company decided to give bonus of 5%
to employee if his/her year of service is more
than 5 years. Ask user for their salary and
Year of service and print the net bonus amount
now write an algorithm ?
Answers
Answered by
1
from datetime import datetime
bonus = lambda year, wages: wages * .05 if datetime.now().year - year > 5 else 0
year, wages = int(input("year of service: ")), float(input("wages: "))
print("Net Bonus:", bonus(year, wages))
Similar questions