1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
astraxan [27]
3 years ago
10

In this lab, you complete a Python program that calculates an employee's annual bonus. Input is an employee's first name, last n

ame, salary, and numeric performance rating. If the rating is 1, 2, or 3, the bonus rate used is .25, .15, or .1 respectively. If the rating is 4 or higher, the rate is 0. The employee bonus is calculated by multiplying the bonus rate by the annual salary.

Computers and Technology
1 answer:
HACTEHA [7]3 years ago
8 0

Answer:

The program is as follows (See attachment)

Comments are used to explain some lines

Fname = input("Enter Employee First Name: ")

Lname = input("Enter Employee Last Name: ")

Salary = float(input("Enter Employee Salary: "))

Ratings = int(float(input("Enter Employee Ratings: ")))

#Initialize bonus rate to 0; This will be used if ratings is 4 or 4

bonusRate = 0.0

if Ratings == 1:

       bonusRate =0.25 #If ratings is 1, bonus rate is 0.25

elif Ratings == 2:

       bonusRate = 0.15 #If ratings is 2, bonus rate is 0.15

elif Ratings == 3:

       bonusRate = 0.1 #If ratings is 3, bonus rate is 0.1

bonus = Salary * bonusRate

print(Lname+" "+Fname+"'s employee bonus is "+str(bonus))

#End of Program

Explanation:

The program saves the employee's first name and last name in variables Fname and Lname, respectively

The employee's salary is saved as float datatype in variable Salary

The employee's ratings is saved as int datatype in variable Ratings

For ratings greater than or equal to 4, the bonusRate is set to 0.0; this is done on line 6 of the program

Line 7 to 12 check if employee Ratings is 1, 2 or 3 and the respective bonusRate is used

Line 13 calculates the employee's bonus

Line 14 prints the employee's bonus

The program is ended on line 15

You might be interested in
What operating system was most commonly used by early personal computers? Apple Mac MS-DOS Windows
marshall27 [118]
Windows, its oldest
8 0
3 years ago
Read 2 more answers
In this exercise you will debug the code which has been provided in the starter file. The code is intended to do the following:
abruzzese [7]

Answer:

The corrected code is as follows:

import java.util.Scanner;

public class U2_L4_Activity_Two{

public static void main(String[] args){

Scanner scan = new Scanner(System.in);

String str1 = scan.nextLine();

String str2 = str1;

str1 = str1.toUpperCase();

System.out.println(str1);

System.out.println(str2);

}

}

Explanation:

This corrects the scanner object

Scanner scan = new Scanner(System.in);

This line is correct

String str1 = scan.nextLine();

This copies str1 to str2

String str2 = str1;

This converts str1 to upper case

str1 = str1.toUpperCase();

This prints str1

System.out.println(str1);

This prints str2

System.out.println(str2);

8 0
3 years ago
Mmmmmmmmmmmmmmmmmmmmmmmmmmmmm
Serga [27]

Answer:

al-Khwarizmi

Explanation:

8 0
3 years ago
Read 2 more answers
11.
Svetllana [295]
11. is battle of the bulge
12. rationing
13. trade embargo act
14. germany won the battle is not true
15. force jews to wear stars sown to their clothing to be caught without was punishable by death
3 0
3 years ago
The RAM memory of a computer contains the volatile memory, which includes
lara31 [8.8K]

The RAM memory of a computer contains the volatile memory, which includes; Websites recently visited

<h3>Random Access Memory(RAM)</h3>

Random access memory (RAM) is defined as a computer's short-term memory that it utilizes to handle all active tasks and applications.

Now, no single program, file, game, or stream would work without a RAM. Thus, RAM is a temporary storage that goes away when we shut down the computer.

Examples of things that RAM store from the options given is only websites visited recently.

Read more about Random Access Memory at; brainly.com/question/86807

3 0
3 years ago
Other questions:
  • A(n) ____ loop executes a predetermined number of times.
    12·1 answer
  • Write a function named get_my_age that returns your age as an int (this is YOUR age, so if you were 21 you would return the numb
    11·1 answer
  • Which fingers should you use to type the reach keys?
    12·1 answer
  • GUI allows users to communicate with a device and see what they are doing onscreen.
    9·1 answer
  • The purpose of a lockout tagout checklist is to​
    9·2 answers
  • Your neighbor has moved to another country. He informs you about his new job. You wantto congratulate him by sending an e-mail m
    13·1 answer
  • Two samples of dirt are collected from a suspect's tread in his shoe and a crime scene. The forensic investigator does a gross e
    6·2 answers
  • Digital cameras always create great photographs. <br>True <br>False
    14·2 answers
  • Similarly, the Windows server OS can run regular workstation applications such as MS Office or Adobe Photoshop. Why is this a ba
    5·1 answer
  • Add me on Fortn!te <br> TsarBacon (imma girl)
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!