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

How were the people south Africa treated by the British during the British rule?
why did politicians practice conservative policies
Calvin murphy is on a swim team. when his parents take him to out-of-town swim meets, they try to visit the local museums and historical sites. this might affec
Describe the elections with Al Gore and George Bush.
what type of plot structure allows authors to follow different characters through their own seperate narratives, eventually converging, as the story is resolved
What number comes next? 2,7,8,3,12,9
an important skill for the beginning home inspector is
Show detail for answering a larger number is five more than twice a smaller number Their sum is 80 find the numbers
What is the expanded form of five and six hundred fourteen thousandths?
Do stripper in the southern hemisphere spine in the opposite direction then strippers in the northern hemisphere?