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

The enormous relief carving of the aztec moon goddess coyolxauhqui ( 3.4.17), found beneath the great temple of tenochtitlan, shows her ________.
What are the coordinates of the vertices of the triangle under the translation (x, y) —> (x + 2, y + 3)?
What’s “City upon a hill”?
The _____ tags must be at the start and end of an ordered list.
A _____ is a software program that is installed without the permission or knowledge of the computer user, that is designed to alter the way a computer operates,
A gamete having more than one complete set of paired chromosomes
Como se sintio gladys despues de la operacion
What’s the radius of a cone if the height is 12 and the volume is 36pi
How did the American and French Revolution influence 19th century revolution in Latin America?
A(n) ________ attack can be used to deny access to a computer system.