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

How many days are in 7.5 years
Kelsie sold digital cameras on her website. She bought the cameras for $65 each and included a 60% markup to get the selling price. To the nearest dollar, what
Gregory Mendel discovered some basic rules about inheritance. DNA. RNA. reproduction.
What is the GCF for 24, 48m
how can you estimate 642 fl oz in cups
The Preamble to the United States Constitution includes the phrase "promote the general Welfare" because its authors knew that A people can be expected to act i
The _____ is the essential noun, pronoun, or group of words acting as a noun that cannot be left out of a sentence. simple subject complete predicate complete s
how does Yakutsk, Siberia compared to Anchorage, Alaska in latitude
All of the following are true about the beginnings of industrialization EXCEPT: Industrialization started because there was a great demand for textiles produced
9.34 kL=____________dal.