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

A $22,000 truck depreciates 14% per year. Find the value of the truck after 8 years. Round to the nearest cent. Exponential Growth Exponential Decay Compounded
Which statement is true? kThe letter has neither reflection nor rotation symmetry.kThe letter has rotation symmetry only.The letter has reflection symmetry only
I need help with these math questions worth 20 points
Compute the following 2/5+3/4
Identify the nonrestrictive phrase in the sentence below: One morning, Bambi smelled something strange smoke from a campfire so he ran to tell the other deer. -
What does it mean to say that the Aztec Empire was “based on a tribute”?
Please help me!!! Food/Exercise Tracker!!! Please
what is -9/12 - (-7/4) plz
Why were temples built for Roman emperors
Which of the following statements best describes how the narrator‘s point of view influence the text of down the rabbit hole