Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write function pay() that takes as input an hourly wage and the number of hours an employee worked in the last week. The function should

Write function pay() that takes as input an hourly wage and the number of hours an employee worked in the last week. The function should compute and return the employees pay. Overtime work should be paid in this way: Any hours beyond 40 but less than or equal 60 should be paid at 1.5 times the regular hourly wage. Any hours beyond 60 should be paid at 2 times the regular hourly wage.

>>> pay(10, 35)

350

>>> pay(10, 45)

475.0

>>> pay(10, 61)

720.0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Multidimensional Array Data Management In Databases

Authors: Florin Rusu

1st Edition

1638281483, 978-1638281481

More Books

Students also viewed these Databases questions

Question

Discuss consumer-driven health plans.

Answered: 1 week ago