Write a program to fetch the name and the state of employees

Assignment Help Computer Engineering
Reference no: EM131983056

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.

Reference no: EM131983056

Questions Cloud

Deming and crosby approach : What is the difference between Deming's and Crosby's approach? How does Crosby plan to attain Zero Defects? How does Juran differ from Cosby.
Bond valuation-holding period return for the one-year period : If you were to sell the bond today what would be your holding period return for the one-year period?
Commitment to corporate social responsibility : Imagine you are a supervisor at Allstate. Suggest a few ways you could help carry out Allstate's commitment to corporate social responsibility.
What evidence of healthy public policy do you see : What information stood out most to you from this case study that you might be able to apply in your local community?
Write a program to fetch the name and the state of employees : 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.
Effect on health care organizations : What employment laws have the most effect on health care organizations?
What is the effective annual rate on loan : What is the effective annual rate on this loan? What will your monthly payments be?
Describe the product and its branding and packaging : Choose a brand that you feel loyal to, and describe the product and its branding and packaging strategies
Write a paper that describing what is the field of cpted : Write two pages using proper APA format describing what is the field of Crime Prevention Through Environmental Design (CPTED).

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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