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
Science,
2 months ago
Math,
2 months ago
Social Sciences,
2 months ago
Science,
4 months ago
English,
4 months ago
India Languages,
9 months ago
Physics,
9 months ago
Physics,
9 months ago