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

round to the nearest hundredth. 84.562
A teacher is choosing 4 students from a class of 30 to represent the class at a science fair. In how many ways can the teacher choose the students?
Solve each inequality, justifying each step you use x-5<35
how to write 6007200 in two other form
what is the names for plants that survive a major disturbance?
Whats the answer to 1/5x=121 x=?
Name one reason why Sevilla, Spain is famous
What is the value of the digits 4 in the number 84,230
how would i solve A= 1/2bh for b
How do you say the number 4.293? Also, write two other forms of this number.