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

Estimate 144,898. Please write that in estimation form
What is 7/6 in simplest. Form
if five notebooks cost $5.25 , how much would three notebooks cost?
What is 9605.327 rounded to the nearest ten?
Complete the square 3x^2+12x-1 show working
negative acceleration & positive acceleration, what are they?
How do you convert 1.16 in to a fraction
Why did people leave the Massachusetts Bay colony to begin new colonies?
write the name given to a large area of sea or ocean that is partially enclosed and is larger than a bay
What roles do proteins play in organisms?