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

Which of the following does the enzyme carbonic anhydrase most likely do to a metabolic reaction?
Help me anyoneeee. Match them
this is due tomorrow if someone could help me that would be great <3
Vosotros _____ a Guatemala. Your answer: van vais va vamos
Find the value of the variables I’ll mark the brainiest!
121/2% in to a fraction ​
linear or non linear?​
How would you say the following sentence in Spanish using the impersonal se? "One eats very well in Mexico."
Select one: O Rhyme gives the rhyming words a different meaning O Rhyme creates an engaging sound effectO Rhyme makes the lines easier to remember O Rhyme empha
Donnez les antonymes des adjectifs suivants en y ajoutant un préfixe. raisonnable – sensé – rationnel – logique - cohérent - réfléchi – défendable - favorable -