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

List three physical requirements for microbial growth.
Which method, also known as the Karvonen method, is used for establishing training intensity based on the difference between a client's predicted maximal heart
What did historians believe about Pope Leo and Attila the Hun's agreement?
PLATO: can somebody please help me; For which function is f(x) equal to f-1(x)?
Find the measure of b
A spherical balloon is inflating with helium at a rate of 72 ft2/min . How fast is the​ balloon's radius increasing at the instant the radius is 3 ​ft? How fast
which one of the following words or phrases may be a clue that a sentence is inferring cause or effect​
which phrase represents t times 33
Complete the proof to show that ABCD is a parallelogram. The slope of it is __________ and because the _________. Therefore, ABCD is a parallelogram because a.
When Veda returned home after the worst typhoon in twenty years, her entire family was wiped out and there was nothing left of her village. Veda wandered off an