Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Multiple Contidional Statements (brushing up on earlier assignments I didn't do too well on) Summary: In this lab, you complete a prewritten Python program that

Multiple Contidional Statements (brushing up on earlier assignments I didn't do too well on)

Summary:

In this lab, you complete a prewritten Python program that calculates an employees end-of-year bonus and prints the employees name, yearly salary, performance rating, and bonus. In this program, bonuses are calculated based on employees annual salary and their performance rating.

Instructions:

1. Variables have been declared for you, and the input statements and output statements have been written. Read them over carefully before you proceed to the next step.

2. Design the logic, and write the rest of the program using if - elif statements.

3. Execute the program entering the following as input:

Jeanne Hanson 70000.00 2 

4. Confirm that your output matches the following:

Employee Name: Jeanne Hanson Employee Bonus: $10500 

Assignment (EmployeeBonus2.py):

# EmployeeBonus2.py - This program calculates an employee's yearly bonus.

# Declare and initialize variables here BONUS_1 = 0.25 BONUS_2 = 0.15 BONUS_3 = 0.1 NO_BONUS = 0

RATING_1 = 1 RATING_2 = 2 RATING_3 = 3

employeeFirstName = input("Enter employee's first name: ") employeeLastName = input("Enter employee's last name: ") employeeSalary = float(input("Enter the employee's yearly salary: ")) employeeRating = int(input("Enter employee's performance rating: "))

# Write your code here

# Output bonus here print("Employee Name: " + employeeFirstName + " " + employeeLastName) print("Employee Bonus: $" + str(bonus))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions