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 is the answer to 12-2x6+2/2
What's the other word stubborn; inflexible
I figured out the 1st question but I do not understand the second one...please show me step by step! Thank you!
What's the word for to talk on and on pointlessly, without clear direction
Choose the more precise measurement in the pair.  A .) 6.7 mi or  B.) 6 mi
Which chemical equation best describes the reaction of potassium metal with fluorine gas to form solid potassium fluoride? A. K(s) + F2(g) → KF2(s) B. K(s) + F(
round to the nearest hundredth 5.6192
What's the word for looking down on others; proud and scornful
write in decimal form fourteen and eighty-Four hundredths
What would cause a decrease in the quality of circulating red blood cells