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

how didi the GI bill affect american society after world war 2
was jackson right to initiate the use of the spoils system to appoint government officials ​
A and b are two similar 2D shapes. The area of shape awhich is 12cm is 200cm squared. Calculate the area of shape b which is 15cm
I ONLY GOT ONE SHOT SO PLS HELP, IM STUPID! ANSWER IF YOU KNOW IT. OR AT LEAST TAKE A LOOK!!!!!!!! ( 2 QUESTIONS) 1. A rectangular trampoline measures 15 meters
What is the surface area of the figure? (Easy 20 points pls help)
Which physicist first identified the electron as an independent part of the atom?
Which combination forms a covalent bond
Which physicist first identified the electron as an independent part of the atom?
Manjiro wondered why the foreigners didn’t just carry their small things in separate pouches, the way it was done in Japan. But once his hands discovered his po
what is the quotient of these