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 square root of 2500????
What is  a Nonlinear graph? i forgot
the leading factor in the european colonization of asia between 1500 and 1800 was the desire
Paula invested in two accounts; one pays 3% simple interest and the other pays 6% simple interest. She invested $5000 more in the account paying 6% than in the
five times a number minus 12 is 92. what is  the number
One-third of a number, decreased by six equals eight. What is the number?
What mass of water will fill a tank that is 100.0 cm long, 50.0 cm wide, and 30.0 cm high? Express the answer in grams.
Which two hormones are secreted from the same gland but oppose the action of one another?
speed with direction is called
Aisha mixes 50 milliliters of yogart, 100 grams of fruit and 250 milliliters of milk to make a smoothie what is the ratio of the amount of yogart to the amount