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

Specialized cells are formed when cells differentiate. True? False/
Is 45/5 equal to a whole number
What percent is 300 of the 1800
What is equilibrium?
My dog weighed 60 lbs and lost 25%of his weight. How much did he lose?
Type a individual said to have a toxic core in an increased risk of heart disease consistently exhibit which characteristics
"Plain folk" propaganda projects an image of a candidate as one of the common people. a. True b. False
what is the answer. I am confused. can the answer be g or h
Many consonants silent today were pronounced in Middle English. a. True b. False
what 65 percent of 89