Answer to Question #283904 in Python for Hari

Question #283904

Bonus Salary




A company decided to give a bonus of 5% to an employee if his / h * e * r




years of service is more than five years. Write a program that reads an employee's salary and years of service and decides whether the employee gets the bonus or not.




Input




The first line of input will contain the salary of an employee. The second line of input will contain years of service.




Output




If the employee gets a bonus, print the net bonus amount. If the employee doesn't get the bonus, print "No Bonus",.




Explanation




For example, if the employee's salary is 25000 and years of experience is 3. As the years of experience is less than 5, the output should be "No Bonus".




Similarly, if the employee's salary is 50000 and years of experience is 6. As the years of experience is more than 5, the employee is eligible for the bonus. By computing the 5% of his salary, the net

1
Expert's answer
2022-01-02T02:24:06-0500

print ("enter salary")

salary = input()

print ("enter year of service")

yos = input()

if yos>5:

print ("bonus is"),0.05*salary

else:

print ("no bonus")


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS