At Westonci.ca, we connect you with the best answers from a community of experienced and knowledgeable individuals. Get detailed and accurate answers to your questions from a community of experts on our comprehensive Q&A platform. Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals.

Create a Python program to solve a simple pay calculation.

Sagot :

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

We appreciate your time. Please come back anytime for the latest information and answers to your questions. Your visit means a lot to us. Don't hesitate to return for more reliable answers to any questions you may have. Thank you for trusting Westonci.ca. Don't forget to revisit us for more accurate and insightful answers.