Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

2 What does the term organisation culture mean?

Answered: 1 week ago

Question

=+you think is being taxed when more money is printed? Why?

Answered: 1 week ago