Write a program based on the given program skeleton

Assignment Help Python Programming
Reference no: EM132011080

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

Reference no: EM132011080

Questions Cloud

What is the genotype of the cow : Using the allele symbolism presented in the section, what is the genotype of the cow?
Corporation taxes to determine the value of levered firm : Use the MM zero tax model with corporation taxes to determine the value of the levered firm.
Why is patient teaching sometimes difficult for the elderly : What are some of the factors affecting poor compliance with drug regimen among the elderly? Why is patient teaching sometimes difficult for the elderly
Develop the firm balance sheet for each alternative : Develop the firm’s Balance Sheet for each alternative. Assume that debt has been converted and warrants exercised.
Write a program based on the given program skeleton : The calculate function would calculate the net wages, and display all information such as wage before tax, taxes, and wage after taxes.
Is folic acid an essential nutrient for humans : Sulfanilamide was the first antibiotic. It acts as a competitive inhibitor of an enzyme necessary for the synthesis of folic acid. Folic acid is our vitamin B9.
Determine how martin should recover the cost : Martin wants his adjusted gross income for the year to be as low as possible. With this objective in mind, determine how Martin should recover the cost
Positive net advantage to leasing the firm : If there is a positive Net Advantage to Leasing the firm will lease the equipment. otherwise, it will buy it. What is the NAL?
Mpf stands for m-phase promoting factor : MPF stands for M-phase promoting factor. Cyclin is degraded by the ubiquitin pathway, so what type go enzymatic activity does MPF have?

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd