Westonci.ca is your go-to source for answers, with a community ready to provide accurate and timely information. Discover in-depth answers to your questions from a wide network of experts on our user-friendly Q&A platform. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.
Sagot :
Answer:
Explanation:
The following code is written in Python. It is a function that takes in the first name, last name, salary, and numeric performance rating of the employee. Then it uses the rating and the salary to calculate the bonus and returns that back to the user. A test case has been created and the output can be seen in the attached image below.
def calculate_bonus(first_name, last_name, salary, rating):
rate = 0;
if rating == 1:
rate = 0.25
elif rating == 2:
rate = 0.15
elif rating == 3:
rate = 0.1
else:
rate = 0
bonus = salary * rate
return bonus

Thanks for using our service. We're always here to provide accurate and up-to-date answers to all your queries. Thank you for visiting. Our goal is to provide the most accurate answers for all your informational needs. Come back soon. We're glad you chose Westonci.ca. Revisit us for updated answers from our knowledgeable team.