Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Assignment

Using For.. loop, Write a program to fetch the name, salary and the state of 5 employees. Calculate the federal tax, state tax and the net salary for each employee. Use the following criteria:

To calculate the federal tax, use the following criteria:

If the salary is greater than 100,000 then calculate the federal tax at 20 percent.
Otherwise calculate the federal tax at 15%.

To calculate the state Tax, use the following criteria:

If the employee is from California, Nevada, Arizona, or Washington calculate the state tax at 10%

If the employee is from Texas, NewMexico, Or Alabama, then calculate the state tax at 9%

If the employee is from Newyork, Illinois, Wisconsin Or Delaware then calculate the state tax at 8%

Otherwise calculate the state tax at 12%

Calculate and display the netsalary.

As mentioned above, the loop should repeat 5 times, once for each employee.

Hint: Each time the computer goes through the loop, it calculates the salary of one employee.

All results must be displayed

Mimir Requirements:

The name of the file must be Module4Homework1.py

Note that mimir will test your program for multiple test scenarios and your program should pass all of them to get 100%

Here is the sample input/output( Please note that you must display a line of "*" after each employee )

Please enter employee Name: 'John'
Please enter employee salary: 30000
Please enter employee state: 'California'
John federal tax is: 4500
John state tax is: 3000
John net salary is: 22500
*****
Please enter employee Name: 'Susan'
Please enter employee salary: 50000
Please enter employee state: 'Alabama'
Susan federal tax is: 7500
Susan state tax is: 4500
Susan net salary is: 38000
*****
Please enter employee Name: 'Adam'
Please enter employee salary: 120000
Please enter employee state: 'NewYork'
Adam federal tax is: 24000
Adam state tax is: 14400
Adam net salary is: 81600
*****
Please enter employee Name: 'Jose'
Please enter employee salary: 95000
Please enter employee state: 'Texas'
Jose federal tax is: 14250
Jose state tax is: 8550
Jose net salary is: 72200
*****
Please enter employee Name: 'Maria'
Please enter employee salary: 78000
Please enter employee state: 'Ohio'
Maria federal tax is: 11700
Maria state tax is: 9360
Maria net salary is: 56940
*****

Here is the list of state names that mimir will check for (Please pay attention to the spelling and case of state names)

California
Nevada
Arizona
Washington

Texas
NewMexico
Alabama

Newyork
Illinois
Wisconsin
Delaware.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92820709
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Systems analysis assignment can you answer the 4 questions

Systems Analysis assignment : Can you answer the 4 questions please? Continuing Case: Personal Trainer, Inc. Personal Trainer, Inc. owns and operates fitness centers in a dozen Midwestern cities. The centers have done we ...

The demand for salt is relatively price inelastic while the

The demand for salt is relatively price inelastic, while the demand for pretzels is relatively price elastic. How can you best explain why and elaborate your answer.

Can you give me short cut of using excel word access share

Can you give me short cut of using excel, word, access, share point, and powerpoint microsoft, I am always have to rely on the back and forth, fleepng the pages, it is possible

A 1000 utility bond with 14 years remaining before maturity

A $1000 utility bond with 14 years remaining before maturity can now be purchased for $760. It pays interest of $20 each 6-month period. What rate of return is earned by purchasing the bond at the current market price pl ...

Solve the following problem from fibonaccis liber abacia

Solve the following problem from Fibonacci's Liber abaci: A man left to his eldest son one bezant and a seventh of what was left; then from the remainder, to his next son he left two bezants and a seventh of what was lef ...

Consider a normally distributed set of scores with a mean

Consider a normally distributed set of scores with a mean of 0 and a standard deviation of 5. If a value of 3.25 is sampled from this distribution, what is the corresponding z-score? If necessary, round your answer to tw ...

Question what is an information system what are the

Question: What is an information system? What are the business benefits of information management? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow the APA format.

When a source operand is ambiguous such as a value defined

When a source operand is ambiguous, such as a value defined as CR EQU 0DH, which can be either a 16 bit value or an 8 bit value, how can the ambiguity be removed. This is typical of an error staring "Is it byte or word?" ...

What is the broadcast domain and ports for hubs and

What is the Broadcast Domain and Ports for hubs and bridges?

Discuss the importance of using an access control model in

Discuss the importance of using an access control model in determining how employees in an organization should gain access to resources.

  • 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