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 appropriate accessor and mutator methods

Design a class that holds the following personal data: name, address, age, and phone number. Write appropriate accessor and mutator methods.

  Write a function that will take two arguments

Write a function that will take two arguments: a word to be searched for and a list of strings containing the grid and write code to read, in turn, each line of the file, remove the newline character and append the resulting string to a list of stri..

  Write a python program that will index a set of documents

You are going to write a python program that will index a set of documents and build a function to search through these documents using the index

  Implement your algorithm in python

Write an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified and reinforce topic material related to the programming work cycle, and the input, processing, output program structure.

  Write a function rmduplic(l), where l is any list

Write a function rmDuplic(L), where L is any list. The function should return a list M that contains the same items as L, except that repetitions (duplicates) have been removed: only the first occurrence of each entry is kept (i.e., order is prese..

  Data wrangling - child mortality

ICT702 - Data Wrangling - Child Mortality - Develop creative approaches to solving the wrangling/analysis problems - Write programs that produce correct

  Create an autopsy data ingest module

Create an Autopsy Data Ingest Module, using python 2.7, that runs cipher.exe (cipher /u /n /h) - Finding Encrypting File System (EFS) files

  Write python code that will execute a list

Write python code that will execute a list of functions with supplied parameters and report the observed runtime for each function run. Assume that the input file has a list of strings like so:

  Asign true to the variable has_dups

Asign True to the variable has_dups if the string s1 has any duplicate character (that is if any character appears more than once) and False otherwise

  Write a python program that generates a small web site

ICT112 Assignment - Generated Web Site for Sports Club. You first task is to choose a sport or club, and get some suitable input data

  Identify the top three comments made in given survey

Identify the top three comments made in survey years 2015 and 2016. Report the top three most common comments based on their relative frequency.

  Write an expression that concatenates the string

Write an expression that concatenates the String variable suffix onto the end of the String variable prefix .

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