subject

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 employee’s end-of-year bonus and prints the employee’s 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))

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen tool
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Define a function printfeetinchshort, with int parameters numfeet and numinches, that prints using ' and " shorthand. ex: printfeetinchshort(5, 8) prints: 5' 8"
Answers: 1
question
Computers and Technology, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
question
Computers and Technology, 23.06.2019 20:30
What is the biggest difference between section breaks and regular page breaks
Answers: 1
You know the right answer?
Multiple Contidional Statements (brushing up on earlier assignments I didn't do too well on)
Questions
question
Mathematics, 15.09.2021 01:00
question
Chemistry, 15.09.2021 01:00
question
Mathematics, 15.09.2021 01:00
question
Mathematics, 15.09.2021 01:00
Questions on the website: 13722362