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

simplify. (8a^3 - 3b^2) - (a^3 + b^2)
Explain the significance of the word "bond" to this era of United States 5.
Which of these cities is Timbuktu? a. A b. B c. C d. D
The technological innovation that most influenced the English language was the A. invention of the computer. B. invention of the recording device.
What is d inner layer of a mollusca shell called?
How are similes and metaphors different
What does this phrase mean "One if by land, two if by sea."
During his rise to power, Hitler gained popularity and helped stir extreme anti-Semitic sentiment by
how many centigrams equal 4 decigrams?
this is about slope