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

What do motor manufacturing engineers do at real work place ?
neeeeed helppppppppppppppppppppppppp
What Principle of animation is used to and me the movements of the arms of the following character while walking ?
Write a program that randomly (using the random number generator) picks gift card winners from a list of customers (every customer has a numeric ID) who complet
Transform the given function f(x) as described. f ( x ) = x 3 Translate right 2 units Translate up 3 units
Use the following stockholders' equity section of Marcy Company on December 31, 2004 to answer questions 45 through 50. Treat each question independent of the o
4 The rate of compound interest is 7.5%. How long will it take for an investment of $4500 tobe worth more than $7000?Please use the compound interest formula fo
What is the climate of south africa?
twice the sum of a number and 8 is equal to 3 times the difference of the number and 7 find the number ​
what is the unknown fraction 2/10 +__=67/100