Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exercise 1: The monthly salary of an employee is based on his(her) basic salary and a bonus based on the number of years of
Exercise 1: The monthly salary of an employee is based on his(her) basic salary and a bonus based on the number of years of service. If number of years of service is five years or less, he (she) gets a bonus of 100 SAR per year of service. If years of service exceed 5 years, he (she) gets 100 SAR per year for the first 5 years, and 200 SAR per year for the remaining years. Write a Python program that reads the basic salary and years of service and compute the monthly salary as shown in the sample runs. Note: You need to define the bonus amounts i.e. 100 and 200 SAR as constants. Sample run 1: Enter basic salary: 4500 Enter years of servise: 3 Salary 4800 SAR Slide Type Sample run 2: Enter basic salary: 4000 Enter years of servise: 12 Salary = 5900 SAR Slide Type
Step by Step Solution
There are 3 Steps involved in it
Step: 1
5 mainpy Constants 1 2 BONUS1 100 3 BONUS 2 200 4 5 I...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started