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

1. What geographical advantages did Rome have as it turned into a great Empire ?
always sometimes or never The Capacity of a container will ALWAYS be less than the containers VolumeExplain too
The narrative point of view in this excerpt allows the reader to experienceThe narrative point of view in this excerpt allows the reader to experience
I Will Give You A Brainliest! guarantee
Which relation describes the graph?
Which Roman leader was responsible for the organization of the empire as shown on this map
Am independent variable is a variable (often demoted by y) whose variation depends on that if another. True or false
Solve for b. –2b = 11b + 13
f(x)2x²+1and g(x)=x²-7find (f+g)(x)
Write the missing numbers to complete the multiplication equation show how much of the deck is painted