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

Describe who are the road users and the risk they face
What was the main accomplishment of the Freedmen's Bureau?
Find all solutions to the equation. cos2x + 2 cos x + 1 = 0
Which two subatomic particles are located within the nucleus of an atom?. . A. protons and neutrons. . B. protons and electrons. . C. elect
What is the role of NaCl and edta in DNA isolation?
What role does pyruvic acid play in cellular respiration?
If two organisms are in the same phylum, then which of these statements is correct? 1. the two organisms belong to the same class 2 . the two organisms belong
What important demographic shift occurred in the 1950s?. . *. Over 50% of families moved from the East coast out west.. . *. Black familie
Which of the following sentences uses prepositions correctly? A. My mother is always asking me where I am going to! B. Maryann was glad to have her dentist app
Find the domain and range of the relation and determine whether it is a function. domain: x > 1; range: y > 0; Yes, it is a function. domain: all real num