A company decided to give bonus of 5% to employee if his/her year of service is more than 5years. Ask user for their salary and year of service and print the net bonus amount.
Question
A company decided to give bonus of 5% to employee if his/her year of service is more than 5years. Ask user for their salary and year of service and print the net bonus amount.
Solution
Sure, here is a step by step solution in Python:
# Step 1: Ask the user for their salary
salary = float(input("Please enter your salary: "))
# Step 2: Ask the user for their years of service
years_of_service = int(input("Please enter your years of service: "))
# Step 3: Initialize the bonus amount to 0
bonus = 0
# Step 4: Check if the years of service is more than 5
if years_of_service > 5:
# Step 5: If yes, calculate the bonus as 5% of the salary
bonus = 0.05 * salary
# Step 6: Print the bonus amount
print("Your bonus amount is: ", bonus)
This script first asks the user to input their salary and years of service. It then checks if the years of service is more than 5. If it is, it calculates the bonus as 5% of the salary. Finally, it prints the bonus amount.
Similar Questions
A company decided to give bonus to employee according to following criteria:Time period of service BonusMore than 10 years 10%>=6 and <=10 8%Less than 6 years 5%
The total amount of bonus paid by the company during the given period is approximately what percent of the total amount of salary paid during this period?0.0010.0050.010.0125
In PostgreSQL, create a PL/pgSQL block that defines a function named calculate_salary_bonus which takes two parameters:employee_id and bonus_percentage. This function should calculate the bonus amount for the employee with the givenemployee_id based on their current salary and the provided bonus percentage. Assume “employee” table with fields – eid, enameand salary
You are tasked with creating a Python program to automate salary calculations based on an employee's years of service and job designation. The program should prompt users to input their years of service and job designation, consider predefined salary structures for each designation, and calculate the final salary. Additionally, implement a feature to display the salary details, including any bonuses or allowances based on the years of service. Design a program that efficiently manages salary computation and provides transparency to employees.Predefined salary structure and Bonus for each designation :'Manager'->base_salary=80000, bonus_rate=0.1'Engineer'->base_salary=60000, bonus_rate=0.08'Technician'->base_salary=45000, bonus_rate=0.05Input Format:In first line, get the name of the employee in string through keyboardIn the second line, get the designation (Manager/Engineer/Technician) in string through keyboardIn the third line, get the year of service in integer through keyboard.Output Format:Display the given details in seperate lines."Name:", name of the employee"Designation:", designation"Years of Service:", year of service"Base Salary:", base_salary"Bonus:", based on bonus rate*year of service*base salary"Total Salary:", calculated total salary
Harry gets an annual bonus of 18% of his base salary if he exceeds his sales quota by $9000. If his base salary is $45 678.00/year and he exceeds his sales quota by the required amount,1) What is his bonus?(Enter your answer with no dollar sign)2) What is his total salary for the year?
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.