answer.
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
uranmaximum [27]
2 years ago
4

Python Assume the input data is structured as follows: first there is a non-negative integer specifying the number of employee t

imesheets to be read in. This is followed by data for each of the employees. The first number for each employee is an integer that specifies their pay per hour in cents. Following this are 5 integers, the number of hours they worked on each of the days of the workweek. Given this data, write a loop and any necessary code that reads the data and stores the total payroll of all employees into the variable total. Note that you will have to add up the numbers worked by each employee and multiply that by that particular employee's pay rate to get the employee's pay for the week-- and sum those values into total.
Computers and Technology
1 answer:
AnnyKZ [126]2 years ago
3 0

Answer:

total_hours = 0

total = 0

n = int(input("Enter the number of employees: "))

for i in range(n):

   pay = int(input("Enter the pay per hour in cents of the " + str(i+1) + ". employee: "))

   for j in range(5):

       hour = int(input("Enter the work hour in " + str(j+1) + ". day: "))

       total_hours +=hour

   total += pay * total_hours

   total_hours = 0

print(total)

Explanation:

Initialize the total hours and total as 0

Ask the user to enter the number of employees

Create a nested for loop. The outer loop iterates depending on the number of employees. The inner loop iterates for each work day.

Inside the outer loop, ask the employee's pay per hour. Then, inside the inner loop, ask for the work hours for 5 days. Sum the hours and assign the value to total hours.

When inner loop is done, multiply the pay with total hours to calculate the pay and add this value to the total for each employee. Also, set the total hours as 0 (For the next employee, total hours will be zero at the beginning).

When the loops are done, print the total

You might be interested in
Which statements describe best practices for aligning text? check all that apply
kiruha [24]

Answer: *use the last column for text with multiple lines.

*use an indent marker to indent the first line of a paragraph.

*use a table if text in multiple columns have multiple lines.

Explanation:

5 0
2 years ago
Read 2 more answers
In the process of retrieving a specific memory from a web of associations a person needs to activate one of the strands that lea
iVinArrow [24]

Answer:

Priming.

Explanation:

The brain is the centre of control for all animals. It coordinates the body system, breathing, beating of the heart, memory, gait, speech, sight etc.

Memory is stored in the brain ( the function of the cerebral cortex in the cerebrum). Two types of memory are the long term and the short term memory. The long term memory stores information permanently in the brain, while the short term holds the information for a while and either transfers it to the long term memory or the memory decays.

To retrieve a specific memory from the wide memory of the brain, it activates a strand that leads to the memory, this process is called priming.

6 0
2 years ago
RADIAC instruments that operate on the ionization principle are broken down into three main categories based on what?
mash [69]

Answer:

Electrical potential.

Explanation:

RADIAC Meter or instruments ( also known as radiation monitoring instruments) are measuring instruments that uses the principles of gaseous ionisation to conduct electricity flow internally to deflect the pointer for its Meter readings. These instruments can be analogue or digital.

They are used in industries to monitor the operation of certain equipments and processes. The level of electrical potential flow in the system determines the state or category of the instrument. Out of six, there are three main categories of electrical potential level.

6 0
2 years ago
In which job role would a course in 3D modeling help with professional career prospects?
ale4655 [162]

Answer:

An eye for detail and good visualization skills.

Explanation:

In which job role would a course in 3D modeling help with professional career prospects? Computer Programmer. Multimedia Artist. Technical Support Specialist.

4 0
2 years ago
A __________ error does not prevent the program from running, but causes it to produce incorrect results. a. syntax b. hardware
Lunna [17]

Answer:

1) syntax error

2)task

3)algorithm

4) pseudocode

5)flowchart

5 0
2 years ago
Other questions:
  • Janice is unsure about her future career path she has grown up on her family farm but she is also interested in medicine Janice
    5·1 answer
  • Suppose Dave drops a watermelon off a high bridge and lets it fall until it hits the water. If we neglect air resistance, then t
    12·1 answer
  • The development of the original personal computer (PC) was a(n) __________ innovation at the time, whereas adding a different ki
    8·1 answer
  • Janis needs to select all the text in a single bullet point. Which action describes the easiest method to perform this task?
    9·1 answer
  • Instructions:
    14·1 answer
  • Type two statements that use rand() to print 2 random integers between (and including) 100 and 149. End with a newline. Ex:
    8·2 answers
  • Assume there is a class AirConditioner that supports the following behaviors: turning the air conditioner on and off. The follow
    7·1 answer
  • Look at the following array definition:
    11·1 answer
  • Janice has a "jammed" key on her keyboard. Every time she strikes the "S" key it sticks and doesn't pop back. What should Janice
    6·2 answers
  • Which group contains the command to manually conduct a spell check ?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!