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
AnnZ [28]
3 years ago
6

The function below takes two numeric parameters. The first parameter specifies the number of hours a person worked and the secon

d the number of dollars that they earn each hour. Compute the value of their weekly pay check. Any time worked beyond 40 hours, is considered overtime. Any overtime earns double pay (but only on the hours beyond the first 40). (python)
Function:

def compute_pay_with_overtime(hours_worked, hourly_rate):
Engineering
1 answer:
Mekhanik [1.2K]3 years ago
5 0

def calculate_pay(total_worked_hours, rate_per_hour):

  if total_hours_worked > 40:

 # anything over 40 hours earns the overtime rate

 overtimeRate = 2 * rate _per_hour

  return (40 * rate_per_hour) + ((total_worked_hours - 40) * overtimeRate

  else:

  # if you didn't work over 40 hours, there is no overtime

   overtime = 0

   return total_worked_hours * rate_per_hour

Explanation:

  • First we create the calculate_pay function which will takes 2 parameters.
  • Secondly ,inside the function we check if  the total_worked_hours is greater than 40 and then return the pay by calculating with the help of formula for work over 40 hours.
  • If the total work hour is less than 40 then we  return the pay by multiplying the total_worked_hours with rate_per_hour.

You might be interested in
People with skills and training in areas such as marketing or accounting are an important part of the manufacturing industry.
adelina 88 [10]

Answer:

true

Explanation:

8 0
2 years ago
Can someone draw a electric circuit with electrical symbols for this
erastovalidia [21]

Answer:

i cant draw it

i am sry

Explanation:

4 0
3 years ago
Read 2 more answers
declare integer product declare integer number product = 0 do while product < 100 display ""Type your number"" input number p
Brilliant_brown [7]

Full Question

1. Correct the following code and

2. Convert the do while loop the following code to a while loop

declare integer product

declare integer number

product = 0

do while product < 100

display ""Type your number""

input number

product = number * 10

loop

display product

End While

Answer:

1. Code Correction

The errors in the code segment are:

a. The use of do while on line 4

You either use do or while product < 100

b. The use of double "" as open and end quotes for the string literal on line 5

c. The use of "loop" statement on line 7

The correction of the code segment is as follows:

declare integer product

declare integer number

product = 0

while product < 100

display "Type your number"

input number

product = number * 10

display product

End While

2. The same code segment using a do-while statement

declare integer product

declare integer number

product = 0

Do

display "Type your number"

input number

product = number * 10

display product

while product < 100

4 0
3 years ago
Engine oil flows through a 25‐mm‐diameter tube at a rate of 0.5 kg/s. The oil enters the tube at a temperature of 25°C, while th
Elodia [21]

Answer:

a) the log mean temperature difference (Approx. 64.5 deg C)

b) the rate of heat addition into the oil.

The above have been solved for in the below workings

Explanation:

3 0
3 years ago
A beam has a rectangular cross section that is 5 inches wide and 1.5 inches tall. The supports are 60 inches apart and with a 12
nydimaria [60]

Answer:

The value of Modulus of elasticity E = 85.33 × 10^{6} \frac{lbm}{in^{2} }

Beam deflection is = 0.15 in

Explanation:

Given data

width = 5 in

Length = 60 in

Mass of the person = 125 lb

Load = 125 × 32 = 4000\frac{ft lbm}{s^{2} }

We know that moment of inertia is given as

I = \frac{bt^{3} }{12}

I = \frac{5 (1.5^{3} )}{12}

I = 1.40625 in^{4}

Deflection = 0.15 in

We know that deflection of the beam in this case is given as

Δ = \frac{PL^{3} }{48EI}

0.15 = \frac{4000(60)^{3} }{48 E (1.40625)}

E = 85.33 × 10^{6} \frac{lbm}{in^{2} }

This is the value of Modulus of elasticity.

Beam deflection is = 0.15 in

6 0
3 years ago
Other questions:
  • 1. Why is outside air mixed with return air?​
    6·1 answer
  • A heat engine receives heat from a heat source at 1453 C and has a thermal efficiency of 43 percent. The heat engine does maximu
    11·1 answer
  • Which best describes the body in terms of simple machines?
    6·1 answer
  • // This program accepts data about 100 books and// determines a price for each.// The price is 10 cents per page for the// first
    12·1 answer
  • A woodcutter wishes to cause the tree trunk to fall uphill, even though the trunk is leaning downhill. With the aid of the winch
    12·1 answer
  • Mahamad Siddiqui sent false emails and letters of recommendation on behalf of individuals without their permission to nominate h
    12·1 answer
  • How many volts of electricity would it take to power up an entire city? Take Tokyo for example. Please explain!
    12·1 answer
  • A MOSFET differs from a JFET mainly because
    13·1 answer
  • When you come to an intersection, follow the _________ before you proceed.
    6·2 answers
  • When an electron in a valence band is raised to a conduction band by sufficient light energy, semiconductors start conducting __
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!