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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:00, vladutraileanu7599
Which of the following has not been attributed at least in part to social media a. drug addiction b. depression c. kidnapping d. murder
Answers: 2
image
Computers and Technology, 24.06.2019 02:00, sameh0425
Which steps will open the system so that you can enter a question and do a search for
Answers: 1
image
Computers and Technology, 24.06.2019 13:00, Savtheartist23
Ais a built in formula in spread spread a is any math process such as addition or subtraction. options are function and operation
Answers: 1
image
Computers and Technology, 24.06.2019 14:30, SmartScholar4094
Two students are discussing electricity that has a frequency of 60 hz. student a says that this type of electricity is referred to as ac. student b says that in this type of electricity, the electrons flow in only one direction. which of the following statements is correct? a. only student a is correct b. only student b is correct c. both of the two students are correct d. neither of the two students is correct
Answers: 1
You know the right answer?
Multiple Contidional Statements (brushing up on earlier assignments I didn't do too well on)

Questions in other subjects:

Konu
History, 22.01.2020 08:31