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

Zoom in giving 5 stars to right answer
Write answer in scientific notation
You have a pizza cut into 12 slices (6 slices have pepperoni, 6 slices are plain cheese). You randomly pick one slice, eat it, then pick a second slice to eat.
Any one know this one please help
Assume markup is based on cost. Find the dollar markup and selling price for the following problem. Item Cost Markup percent Dollar markup Selling price Burberr
Linear pairs are___ supplementary. A) always B) sometimes C) never
The significance of the _______________ is that it put Prussia back in a leadership position in the German confederation and made Austria a follower of Prussia
What would y be for month 1, x
Please help me Calculate the activation energy for a first-order reaction if its rate constant increases from 10 s–1 to 100 s–1 as the temperature increases fr
Are these scalene triangles simila