Question: Create a Python script file called Assignment _ Ch 0 4 - 1 _ yourLastName.py . ( Replace yourLastName with your last name. ) Write

Create a Python script file called Assignment_Ch04-1_yourLastName.py.(Replace yourLastName with your last name.)
Write a Python program prompts the user to input number of hours worked, hourly rate and output pay amount. If hours worked is over 40 hours, calculate overtime pay (1.5 times of hourly rate). If hours worked is over 60 hours, calculate double overtime pay (2 times of hourly rate). Also, if user enters wrong input (entering characters, negative numbers, etc.) your program needs to display message informing user of wrong input. For this assignment, you need to utilize the function to carry out calculation of the pay. Create a function called CalPay (hrs, rate) which will take two arguments and return pay amount. Hourly rate and number of hours worked can be integers or floating point numbers.
Since we haven't covered loop yet, your program doesn't need to repeat yet.
Test your program.
Submit your program file.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!