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 did most americans of this era feel about the beliefs and practices of their puritan ancestors?.
While preparing some chicken wings for cooking you observe white fibers connecting the bones and the muscles to bone. What type of fibers are these?.
How does the repetition of stanzas from Part I that appear at the end of Part II of "The Highwayman" influence the poem's meaning?It reminds the reader that wha
How did Congress and Sam Houston try to reduce the republic’s debt?
Hemp help help help help please English
problem referred below pls help
Teachers, doctors, and lawyers need professional licenses in order to perform their jobs legally. Who has the authority to issue these licenses? School boards
It's easy for us to get stuck in our own minds and own worlds. This causes us to not see the perspectives of others. Take a moment to consider the perspectives
do atoms have potential and kinetic energy
does the graph represent a function? yea or no