Computer Science, asked by sweety44097, 4 months ago

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 jai696
1

\huge\red{\mid{\fbox{\tt{Using\: Python\: 3}}\mid}}

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))

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions