Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Python Expert

Question: 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.

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

Python, Programming

  • Category:- Python
  • Reference No.:- M92848728
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Python

Assignment1 utilising python 3 build the following

Assignment 1. Utilising Python 3 Build the following regression models: - Decision Tree - Gradient Boosted Tree - Linear regression 2. Select a dataset (other than the example dataset given in section 3) and apply the De ...

Question write a simple python program that takes use

Question: Write a simple python program that takes use inputs as non-zero digits and converts them into binary form. The response must be typed, single spaced, must be in times new roman font (size 12) and must follow th ...

Question why is software configuration management

Question : Why is software configuration management considered an umbrella activity in software engineering? Please include examples and supporting discussion. The response must be typed, single spaced, must be in times ...

Python programming assignment -you first need an abstract

Python Programming Assignment - You first need an abstract base class, called, Account which has the following attributes and methods: accountID: This attribute holds the ID assigned the account , if not provided set to ...

In this programming assignment you will write a client

In this programming assignment, you will write a client pingprogram in Python. Your client will send a simple ping message to a server, receive a correspondingpong message back from the server, and determine the delay be ...

Part i the assignment filesone of the most important

Part I: The Assignment Files One of the most important outcomes of this assignment is that you understand the importance of testing. This assignment will follow an iterative development cycle. That means you will write a ...

Quesiton write a python script that counts occurrences of

Quesiton: Write a python script that counts occurrences of words in a file. • The script expects two command-line arguments: the name of an input file and a threshold (an integer). Here is an example of how to run the sc ...

The second task in this assignment is to create a python

The second task in this assignment is to create a Python program called pancakes.py that will determine the final order of a stack of pancakes after a series of flips.(PYTHON 3) Problem Task In this problem, your input w ...

Show times in tmus and seconds1 an associate grasps an oven

Show times in TMUs and seconds. 1. An associate grasps an oven door within reach and pulls it open 18 inches with the left hand (he does not relinquish control of the door). With a pan in the right hand, he carefully pos ...

Project reconnaissance and attack on ics

Project: Reconnaissance and Attack on ICS NetworksEnvironment Setup The second mini project will be based on Industrial Network Protocols, specifically the Modbus protocol. Please follow the instructions carefully to set ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As