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

Are carrots bad for you?
Read the passage from Of the Wisdom of the Ancients. For Venus excites the general appetite of conjunction and procreation; Cupid, her son, applies the appetite
What unnatural happenings does Horatio equate with the ghosts appearance?
simplest form for 11 .751
What expression can be used to estimate 868÷28
any poem about love or nature?
what does it mean by 2cm:1unit on a graph
Dawn is trying to find out how much weight she can push across the room. She is really trying to find her __________. a. flexibility b. muscular endurance c.
Augusto _____ to play soccer just before I called him. Which verb phrase is needed to sequence tenses correctly? is going has been gone will be going had gone
what does people who live in glass houses shouldn't throw stones mean?