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

June's mother was 29 when June was 5 years old. How old will June be when she is one-quarter her mother's age?
please urgent please help
What is the following difference? 2ab * (root(3, 192a * b ^ 2)) - 5(root(3, 81a ^ 4 * b ^ 5))
11. Show the following operation on a number line(-7) + (-2) + (+6)​
i weigh 60 kg, what is the best way to reduce my weight to 30 kg?
help, will mark if you get it correct!!!
I need help ASAP T^T I will give brainliest to the correct answer!!
Game Informer (often abbreviated to GI) is an American-based monthly magazine featuring articles, news, strategy, and reviews of popular video games and associa
Joe reviews the literature and comes to believe that as one's educational level rises, so does one's income. Joe has created which of these
What can help an interface user understand or navigate an online interface?​