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

Who will take responsibility for making decisions or who is the final point of authority?
Which of the following will probably happen to a product when demand is low?
What statement could explain why viruses were not the first to evolve?
I WILL UPVOTE<3 What is w(4) for the function w(x)=3x+7? A. 41 B. 19 C. 14 D. 33
Why was president Lincoln unable to persuade Congress to except is reconstruction plan
What is a CHOIR and explain plz ;) thnx .
five days following the meeting at Appomattox putting an new to the war what occurred
"Circe, am I a boy, / that you should make me soft and doting now?" (From The Odyssey, Part II) a) needy b) adoring c) weak d) imprudent
Write the include directive needed to allow use of the various i/o operators such as cout and cin.
How do you solve this proublem