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

Wanda, the Channel 1 weather person, said there was a 30% chance of rain on Saturday and a 30% chance of rain on Sunday. Should Wanda be fired? HELP PLEASE
John Sells Hamburgers For $3 Each and cheeseburgers for $3.50 each. One afternoon, he sells a total of 24 burgers for $79. How Many hamburgers did he sell?
What is the correct term for a release of an ovum in the female reproductive system?
Lane is 10 times Mels age.  If the difference in their age is 27, how old is Mel?
Add the following fractions.3/8 + 5/12 =
Select the simplified expression for 8(x - 4) - 4(x - 3) + 7x. 11x + 4411x - 711x - 4411x - 20
In the book: A Wrinkle in timeWhat advice, which was given by Mrs. Who, does Charles Wallace forget to follow?A.Only fools are afraid.B.Go off on your own when
Scientists divide rocks into groups based on_________
Which physical feature has most limited the movement of people living in North America ?
Does an Off-Duty Police Officer have Authority in US?