Question
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
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.
Since we haven't covered loop yet, your program doesn't need to repeat yet.
OUTPUT:
- The bold text is the user's input.
================================================ Please enter number of hours worked for this week: pl What is hourly rate? ty You entered wrong information for hours. ================================================ Please enter number of hours worked for this week: 76 What is hourly rate? ty You entered wrong rate information.
================================================ Please enter number of hours worked for this week: 85 What is hourly rate? 20 Your pay for this week is: 2400.0
================================================ Please enter number of hours worked for this week: 23.2 What is hourly rate? 15.2 Your pay for this week is: 352.64
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started