Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

cnallenge: mprovea Annua vvage ca cuiator Description: Write a Python 3 program called wage _ calculator.py that accepts user input from the keyboard for the

cnallenge: mprovea Annua vvage cacuiator
Description: Write a Python 3 program called wage_calculator.py that accepts user input from the keyboard for the hours worked and hourly wage. The program calculates the total wages for
the year, assuming the person works 350 days per year and 12% taxes are deducted from the wages. The program is to handle exceptions and not crash based on user input. A negative value
for hours worked or hourly wage are not to be accepted from the user. And, after each calculation the user is to be prompted if they want to perform another calculation.
Purpose: Provide experience with writing an interactive Python program that accepts input, performs a calculation, then displays the result as output.
Requirements:
Your program needs to:
Ask the user to input from the keyboard for two inputs, one is the hours worked daily and the other is the hourly wage. Multiplying hours worked daily and hourly wage will give you the
wages earned in a day.
The two input numbers are not necessarily integers. For example, the user can enter values like 35.5 for hours worked or 17.85 for hourly wage.
Calculate the yearly wage given the two inputs
Note that the working hours is daily. Assume the user works 350 days per year and the same amount of hours every day.
It would help to first write down the mathematical formula needed to calculate the yearly wage
12% will be deducted from yearly earnings for taxes
Print the a Pay Advice containing:
hours worked
hourly wage
wages before taxes
tax amount
annual wages after taxes
money values should be printed with a $ sign and all numbers should be rounded to 2 decimal places
The following are additional requirements for this challenge:
User input may not cause the program to crash. Exceptions from invalid user input must be handled gracefully. The user is to be given feedback about invalid input and given the
opportunity to supply the input without needing to run the program again.
Negative values for hours worked and hourly wage are not to be accepted from the user. If a negative value is provided the user is to be given feedback and asked again for the value.
After each calculation the user is to be prompted if they want to perform another calculation. If they answer with a "y" then they are to be prompted for new input and another calculation
is to be performed. If they provide any other response the program is to exit.
image text in transcribed

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

Step: 3

blur-text-image

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

Progress Monitoring Data Tracking Organizer

Authors: Teacher'S Aid Publications

1st Edition

B0B7QCNRJ1

More Books

Students also viewed these Databases questions

Question

What is dividend payout ratio ?

Answered: 1 week ago

Question

Explain the factors affecting dividend policy in detail.

Answered: 1 week ago