Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Business Management Expert

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')

Business Management, Management Studies

  • Category:- Business Management
  • Reference No.:- M93062730
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in Business Management

With respect to your use of the internet have you ever

With respect to your use of the Internet, have you ever taken a speculative risk? If yes, what was it? If no, would you ever consider taking it?

Can anyone help with the following questionsin the search

Can anyone help with the following questions? In the "Search" component of Amazon's strategy, why do you think companies choose Amazon search over Google search? What do you think is the real competitive advantage this h ...

Suppose the production function for a firm is given

Suppose the production function for a firm is given by:  q=4L 0.75 K 0.25 . If the firm currently has  10  units of capital (K) and  10  units of labor (L), then calculate the Marginal Rate of Technical Substitution (MRT ...

Need guidance on coming up with a c program with a function

Need guidance on coming up with a C program with a function named random Between that returns a random floating point number between the two floating point limits you give it as arguments (lower limit first). In the fina ...

1 what is the pepsico business model2 what is the reason

1. What is the PepsiCo business model? 2. What is the reason for incorporating the lean approach at PepsiCo? 3. What is the planning process for lean management operations in (PepsiCo)? 4. How to implement an information ...

Question 1 systems theory integrated the ideas of the

Question 1: "Systems theory integrated the ideas of the classical and human relations' theories while contingency theory extended them."  Discuss. Question 2: "An individual's behaviour is sometimes based on their percep ...

Writea c functionnbspescapechar s char tnbspthat converts

Writea C function escape(char s[], char t[]) that converts the characters newline and tab into two character sequences n and t as it copies the string t to the string s. Use the C switch statement. Also write the reverse ...

What is the difference between a heroic leader and a

What is the difference between a heroic leader and a transformational leader and which of the two is best suited to work in today's business world?

Create brochure that could be given to people considering

Create brochure that could be given to people considering starting their own business and who want to know the key considerations when developing a business plan and determining the best methods of managing the business' ...

Tell me something about employment law issues about ford

Tell me something about Employment law issues about Ford Motors and its references.

  • 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