Calculate the weekly average tax withholding for a customer

Assignment Help Business Management
Reference no: EM132074097

My code needs to have the following elements: calculate the weekly average tax withholding for a customer, given the following weekly income guidelines: Income less than $500: tax rate 10%; Incomes greater than/equal to $500 and less than $1500: tax rate 15%; Incomes greater than/equal to $1500 and less than $2500: tax rate 20%; Incomes greater than/equal to $2500: tax rate 30%. Store the income brackets and rates in a dictionary. Need a loop that prompts the user for an income, looks up the tax rate from the dictionary, and ***prints the income, tax rate, and tax***. The loop runs indefinitely until the user enters a loop termination sentinel. My code works correctly EXCEPT it does not print the "tax rate"(%) as required

def tax(income):

 di={0:10,1:15,2:20,3:30} 

 total_tax=0

 if(income<500):

  total_tax=di[0]*income

 elif(income<1500 and income >=500):

  total_tax=di[1]*income

 elif(income<2500 and income >=1500):

  total_tax=di[2]*income

 else:

  total_tax=di[3]*income

 return total_tax

print("Enter income to calculate tax.")

n=int(input('Enter income :'))

while(n!=-1):

 print("Calculated tax is : ","%.2f"%tax(n))

 n=int(input('Enter income :'))

print('Bye')

Reference no: EM132074097

Questions Cloud

Why might you want to choose one over the other : Suppose that you have an option to host your company's website in the cloud on a server running Linux or on a server running Windows.
What are the best practices for making such a decision : How do companies decide when it is time for new leadership and what are the best practices for making such a decision? Should be 9-10 pages.
What types of problems does one tend to solve : What is a framework and what types of problems does one tend to solve?
Calculate total budgeted food sales revenue : Beverage sales revenue normally averages 15% of lunch food sales revenue and 32% of dinner food sales revenue. Calculate total budgeted food sales
Calculate the weekly average tax withholding for a customer : My code needs to have the following elements: calculate the weekly average tax withholding for a customer, given the following weekly income guidelines
Choose for a website back end : With so many languages from which to choose for a website's back end (among them C#, Java, JavaScript, PHP, Python, Ruby, et al.),
What was his annual return on investment : If the account is currently worth $93,400, what was his annual return on this investment?
Develop scenarios to test each component of usability : Usability is often used to determine the effectiveness of new technology, in particular, EHR or EMR systems. Usability is measured by five key components.
Perform task with a basic access list : For telnet to the router in particular, how could you perform this task with a basic access list?

Reviews

Write a Review

Business Management Questions & Answers

  Estimating the manufacturing plant or product design

You may choose one area of the company, such as a manufacturing plant or product design, to focus on if you can make a strong case. Your recommendations should have the following features.

  Recommend to increase seat belt use

What actions would you recommend to increase seat belt use, especially by young drives? Why do you think those actions would be successful?

  Define restriction fragment length polymorphism

Define restriction fragment length polymorphism (RFLP) analysis. The information generated from RFLP is useful in criminal investigations. Suppose some DNA samples are taken from a crime scene, suspect, and the victim.

  Legal responsibilities that employers

Suggest two (2) benefits that unions can provide for an employer. Justify your response. Examine two (2) legal responsibilities that employers.

  Randy tireland makes a product that sells

Annual fixed costs are $24,000. If they sell 10 units less than break even, how much loss would the company recognize on its income statement?

  Selective attention-comprehension

People are continuously bombarded by physical and social stimuli in the environment. Since they are unable to fully comprehend all this information, they selectively attend to subsets of environmental stimuli that include salient or important info..

  Five specific things of ineffective leader

Describe an Ineffective leader: Then, List up to five specific things that the person (your leader) did or said that made you see him or her as a POOR leader?

  Egg versus the egg of the surrogate

What are your thoughts on couples using family members to be the surrogate mothers? Does it make a difference if the couple is using their own fertilized egg versus the egg of the surrogate?

  Fundamentals of digital signal processing

Why must poles and zeros occur in complex conjugate pairs?" is the question. the book that i am using is "fundamentals of digital signal processing

  Sap the erp system proposed erp architecture

4 page paper on the following items about SAP the ERP system Proposed ERP architecture ERP Components and Database Requirements

  Organizational research and theory

Reflecting on your own personality, respond to this project in an essay, addressing each item below. 1.  Describe how emotional intelligence and understanding personality types are important for developing relationships.

  Seu discussion board policy

The original posts to the discussion are due according to SEU Discussion Board policy, which gives our team ample opportunity to engage in dialogue, probe, and contribute to the threads of the conversations.

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