Answered step by step
Verified Expert Solution
Link Copied!

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

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions