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

When simplified, the expression (x ^1/8) (x^3/8)  is 12. Which is a possible value of x?
What is 70% of 65? and please explain to me... thankyou I need more practice on questions like this...
We use a reflexive verb when we are doing something to ourselves, not to someone else.
Divide (x^5+15x^4+54x^3-25x^2-75x-42) by x+8 Please show all work
What are the effects of consuming a diet made up mostly of fats? there is more than one correct answer; select all the correct answers?
Why did the holocaust happen? I need to know in 2 weeks WHY it happened. So please help me!
HELP Please THANKS :(.....
Which of the following is a subordinate clause? Before you leave for school The road is bumpy My sister went to the mall The audience laughed
PLEASE HELP ME!! It's urgent
Solve for t: 35t + 70 (7-t) = 385