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

Anna has 3 3/4 cups of yogurt to make smoothies. Each smoothie uses 1/3 cup of yogurt. What is the maximum number of smoothies that Anna can make with the yogur
Does the 25th amendment set the order for succession
This quotation from the Supreme Court ruling in the Scott v.Sandford case relates to the?
How is the present progressive tense different from present tense?
PLEASE HELP I ONLY HAVE 11 MINS LEFT!!!
Define mechanical wave (make sure to use the word “medium”)
What does the fox say
John is hiking a trail that is 0.8 miles long he hikes the first 2/10 of the distance by himself he hates the rest of the way with her friendsHow far does the h
For each graph, calculate the slope of the line. Whew is the slope between 2,6 and 8,4
Trapezoid Area Problem