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

what is the area of this?
Please help me ASAP I really need to know the answer before the teacher calls on me!1!!1!1!1!
parents should communicate openly when helping a child cope with the death of a loved one
What soil particle size is the smallest?
When a current flows through a metal wire, the moving charges are?
A 9 foot speed limit sign casts a 12 foot shadow. the tree next to it casts an 18 foot shadow. how tall is the tree.
What is the standard notation for 24 squared
Physical capital is known as human-made objects. TRUE FALSE
A map is an example of a(an) a. observation. b. inference. c. prediction. d. model.
Jamal ate 1/4 of his bag of popcorn. His 3 friends had equal shares of the popcorn that was left. Which expression represents the fraction of the popcorn that e