Question: This the entire question Code Exercise #2 1. Review the program below that calculates an employees yearly bonus based on a score value. The score

This the entire question
Code Exercise #2
1. Review the program below that calculates an employees yearly bonus based on a score value. The score is calculated by taking the dollar value of the transactions completed, dividing it by the number of transactions, and the number of shifts the employee worked.
2. Bonuses are awarded as follows:
Employees with a calculated score between 0-30, receive $50
Employees with a calculated score between 31 69, receive $75
Employees with a calculated score between 70 199, receive $100
Employees with a calculated score of 200 or above, receive $200
3. Take a look at the code and add two print statements below #Output bonus here section that will display two lines based on employee John Smith receiving a $75 bonus:
Line 1: Employee Name: John Smith
Line 2: Employee Bonus: $75
# EmployeeBonus.py - This program calculates an employee's yearly bonus.
# Declare and initialize variables here
BONUS_1 = 50.00
BONUS_2 = 75.00
BONUS_3 = 100.00
BONUS_4 = 200.00
employeeFirstName = input("Enter employee's first name: ")
employeeLastName = input("Enter employee's last name: ")
numShifts = int(input("Enter number of shifts: "))
numTransactions = int(input("Enter number of transactions: "))
dollarValue = float(input("Enter dollar value of transactions: "))
score = (dollarValue / numTransactions) / numShifts
if score <= 30:
bonus = BONUS_1
elif score < 70:
bonus = BONUS_2
elif score < 200:
bonus = BONUS_3
else:
bonus = BONUS_4
# Output bonus here
YOUR ANSWER HERE:
print
print

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!