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

In a market economy, market prices are determined through buying and _____ decisions. [government] [selling] [consuming]
a piece of note paper has side length of 12.5 centimetres what is the area of the piece of note paper
I am so confused with my assignment. Any ideas on an argument topic? I don't even know how to write one or where to begin help!!!
Early humans used rocks as tools to make other things as well as to construct buildings. Why was it better for them to use rocks than another material such as w
bacterium that grows each hour exponentially and determine how much it grows per hour.
Your lifelong health can be affected by good nutrition because good nutrition can
35% of what number is 21
What is a light-year equal to? A. the distance light travels in one year B. the time it takes light to travel 10 trillion kilometers C. the mean distance betwee
What do multimillion-dollar sponsorships of famous athletes symbolize?
discuss briefly what does this test (NBT) entail