January 19/May 16 2022
Assignment 10 - Due May 15th
Do:
Write a Python program that will compute the potential raise for an employee based on the
department the employee works in. Valid departments are 'HR’, "EXEC', 'TRAIN'. Here are the
formulas for raises:
HR = 5% raise
EXEC = 10% raise
TRAIN = 15% raise (hey it can happen!)
So. If the employee belongs to the 'HR" department, and makes S50 on norun
th

January 19May 16 2022 Assignment 10 Due May 15th Do Write a Python program that will compute the potential raise for an employee based on the department the emp class=

Respuesta :

Answer:

This should get you started. Many things could be improved. You could keep adding layers to this program if you wanted to, so I wrote it with that in mind.

The new salary depends on the employee's department and current salary. I created a class that represents each employee. The function looks at the employee's current salary, and looks up what the employee's department raise will be (using the dictionary/hash table) before performing the calculation.

Ver imagen klekaelly