21 Aug Python 5.1
Please read the entire problem description before attempting the program. This program must be done using functions. If you write it without functions, you will loose 30 points.
Please note that Mimir will give you maximum 70 points, the remaining 30 points will be based on manual grading.
Write a program where the main part of the program collects the data such as employee hours, hourly rate, state of residence, and marital status.
It then calls the function Calculatewages() function and sends employee hours and hourly rate.
The Calculatewages () function would calculate the wages and sends it back to the main.
The main program would use the wages returned by Calcualewages() function and send it another function called CalcualteFederaltax() along with marital status. The CalcualteFederaltax() function would calculate the federal tax based on marital status and send the fedtax amount back to the main.
Then the main function would call another function called calculatestatetax() and send the wage and state of residence info to that function. Calculatestatetax() function would calculate the state tax based on the state of residence and send stat tax back to the main.
The main then would call the function calcualtenet() function and send wage, fedtax, and statetax returned by the above functions.
The calculate function would calculate the net wages, and display all information such as wage before tax, taxes, and wage after taxes.
You can write your program based on the following program skeleton
‘main part of the program.
Collect hoursworked, hourlyrate, stateofresidence, maritalstatus from the user.
Call calculatewages() and send hoursworked, and hourlyrate. The caclulatewages() function returns wages.
Call calculatefedtax() function and send marital status and wage returned by calculatewages() function. This function returns fedtax.
Call calculatestatetax() function and send wage, stateofresidence. This function sends back statetax.
Call calculatenet() function and send, wage, fedtax, statetex. Note that fedtax was returned by calculatefedtax() function and statetax was returned by calculatestatetax() function.
Function calculatewages() receives hours worked and hourly rate from the main.
Calculate the wages and sends it back to the main.
Function CalcualteFederaltax () receives wages, and maritalstatus from the main.
Calculate the fed tax based on the marital satus.
Calculate the fed tax at 20% for “Married” and at 25% for “Single”. For others calculate it at 22%
Function calculatestatetax () receives wages and state of residence from the main.
Calculate the statetax sends it back to the main.
Statetax is calculated based on the following criteria.
For those who are from “CA”, “NV”, “SD”, “WA”, “AZ”, calculate the state tax at 8%
For those who are from “TX”, “IL”, “MO”, “OH”, “VA”, calculate the state tax at 7%
For those who are from “NM”, “OR”, “IN”, calculate the state tax at 6%
For the rest calculate the state tax at 5%
Send back the state tax to the main.
Function calcualtenet () receives wages, fedtax, statetax from the main.
Calculate the netwages.
Display the wages, fedtax, statetax, netwages.
Here are the mimir requirement
The file name must be Module5Homework1.py
Test Case1:
Please enter your work hours: 30
Please enter your hourly rate: 50
Please enter your state of resident: ‘CA’
Please enter your marital status: ‘Married’
**********
Your wage is: $1500
Your federal tax is: $300
Your state tax is: $120
Your net wage is: $1080
**********
Test Case2:
Please enter your work hours: 60
Please enter your hourly rate: 40
Please enter your state of resident: ‘OR’
Please enter your marital status: ‘Single’
**********
Your wage is: $2400
Your federal tax is: $600
Your state tax is: $144
Your net wage is: $1656
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Wridemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.
