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

It takes Olivia 12.5 minutes to swim 20 laps around the pool what is Olivia unit rate
Which of the following is true about semi-conductors: A. Neither free electrons nor holes are considered charge carriers in a semi-conductor B. Ex
what is the half off price for $1.98
Which type of image uses lossy compression to reduce file size? a. jpg b. bmp c. tif d. raw?
After receiving a reward for escaping the puzzle box, the cats ________. A. appeared to enjoy the box more B. escaped more slowly C. gradually learned to esc
NEED HELP ASAP!! Account for the North American colonies' defeat of Britain in the Revolutionary War.
2+y-8=19 what is the value of y
In 1787 the United States was at a crossroads. Farmers in western Massachusetts had rebelled the year before over property taxes. The state struggled to end the
Why has the United States criticized Uzbekistan?
what does Jefferson think of the connecticut compromise?