LoriU LoriU
  • 01-03-2021
  • Computers and Technology
contestada

Create a Python program to solve a simple pay calculation.

Respuesta :

josiaharnold24 josiaharnold24
  • 01-03-2021

Answer:

def weeklyPaid(hours_worked, wage):  

   if hours_worked > 40:  

       return 40 * wage + (hours_worked - 40) * wage * 1.5

   else:  

       return hours_worked * wage  

 

 

hours_worked = 50

wage = 100

 

pay = weeklyPaid(hours_worked, wage)  

 

print(f"Total gross pay: Rs.{pay:.2f} ")

Explanation:

provides gross pay

Answer Link

Otras preguntas

I'm in desperate need of help please !!
What is the correct expansion of (3x-2)(2x^2+5)
Which of the following is most accurate regarding Ethiopian doctors?        A. There were fewer Ethiopian doctors practicing medicine in Canada than in Ethi
Which of the following words suggest a point of view
A backyard is 20 feet long and 15 feet wide. What is the length of a diagonal path that cuts across the yard
Help me please! How did China change under Kublai Khan?
The tools of formal analysis help us to:
(14 + 13) + 2 = 29 Choose an equivalent addition sentence that shows the associative property of addition. 29 = (14 + 13) + 2 (14 + 13) + 2 = 29 14 + (13 + 2)
A nurse discusses ginger root with a pregnant patient who asks about the risks and benefits of using ginger root
Write out the form of the partial fraction decomposition of the function (see example). do not determine the numerical values of the coefficients. (a) x4 + 5 /