This the entire question Code Exercise #2 1. Review the program below that calcu
ID: 3803410 • Letter: T
Question
This the entire question Code Exercise #2 1. Review the program below that calculates an employee’s 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 This the entire question Code Exercise #2 1. Review the program below that calculates an employee’s 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 This the entire question Code Exercise #2 1. Review the program below that calculates an employee’s 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 printExplanation / Answer
python 3 code:
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
print("Employee Name: " + str(employeeFirstName) + str(employeeLastName))
print("Employee Bonus: $" + str(bonus))
Sample Output:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.