0% found this document useful (0 votes)
6 views1 page

Lima Homework

The document outlines two scenarios: calculating employee bonuses based on years of service and performance ratings, and calculating late fees for overdue library books. It specifies the rules for bonus calculations and late fee structures. The document requests pseudocode and Python code for both processes.

Uploaded by

fizzasyr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Lima Homework

The document outlines two scenarios: calculating employee bonuses based on years of service and performance ratings, and calculating late fees for overdue library books. It specifies the rules for bonus calculations and late fee structures. The document requests pseudocode and Python code for both processes.

Uploaded by

fizzasyr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Question 1

A company calculates bonuses for employees based on their years of service and
performance rating. The rules are as follows:

1. If an employee has worked for 10 years or more and has a performance rating of 5,
they receive a bonus of $1000.
2. If an employee has worked for 10 years or more and has a performance rating of 3
or 4, they receive a bonus of $500.
3. If an employee has worked for less than 10 years and has a performance rating of
5, they receive a bonus of $300.
4. In all other cases, the employee receives no bonus.

Write the pseudocode for this process, then convert it into Python.

Question 2
A library calculates late fees based on the number of days a book is overdue:

• If the book is overdue by 1 to 5 days, the fee is $2 per day.


• If the book is overdue by 6 to 10 days, the fee is $3 per day.
• If the book is overdue by more than 10 days, the fee is $5 per day.
• If the book is returned on time, there is no fee

Write the pseudocode for this process, then convert it into Python

You might also like