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

CO2 enters and O2 escapes from a leaf via. A) stomata. B) grana. C) thylakoids. D) stroma.
How did the declaration of independence influenced the writing of the declaration of the rights of man and the citizen
Two balloons are charged with an identical quantity and type of charge: -4 nc They are held apart at a separation distance of 70 cm. Determine the magnitude of
Under executive order 9066 the military
the diaper service where you work bills customers once a week. Each week, it charges $0.30 each for the first 75° used, and $0.25 each for any additional diaper
Matching. PLEASE HELP!!
The skin covering the human body consists of _____ layers. 6 4 3 2
A and B share the cost in a ratio of 3:2 . The cost is ?85; how much does A pay?
Help Please Thank You In Advance​
The general process by which bones form is called: a) ossification b) osteomalacia c) calcification d) apposition e) orthodontics