Question

In: Computer Science

There are two types of taxes: Federal tax and province tax. 1.Federal taxes: Assume that the...

There are two types of taxes: Federal tax and province tax.

1.Federal taxes: Assume that the share of income $35,000 and below is federally taxed at 15%, the share

of income between $35,000 and $100,000 is taxed at 25%, and the share of income over $100,000 is taxed at 35%.

(i.e an income over$ 100,000 is taxed as follows:

-The portion of income up to and including the first $35,000 is federally taxed at 15%.

-The portion of income between $35,001 and $100,000, inclusive, is federally taxed at 25%.

-The income earned beyond $100,000 is federally taxed at 35%

Province taxes: Assume that there is no provincial income tax for income up to $50,000 but is a flat 5% for all income above $50,000.

Write 2 functions to calculate total tax liability for any income.

•Function fed_tax that takes one parameter income as an input and return a number that represents the calculated federal tax.

•function prov_tax that one parameter income as input and return a number that represents the calculated province tax.

Write a testing program named t03.py that tests the functions by asking the user to enter an income

and displays the calculated taxes.

A sample run:

Enter your income: $200000

Federal tax: $56500.00

Provincial tax: $ 7500.00

Total tax: $64000.00

Solutions

Expert Solution

Please comment, if you need any corrections.Please give a Thumps up if you like the answer.

Program

def fed_tax(income):
if(income<35000):
federal_tax=.15*income
elif(income<100000 and income>35000):
federal_tax=(.15*35000)+(.25*(income-35000))
elif(income>100000):
federal_tax=(.15*35000)+(.25*(100000-35000))+.35*(income-100000)
return federal_tax

def prov_tax(income):
if(income>50000):
province_tax=.05*(income-50000)
return province_tax

def main():
income=float(input("Enter your income: $"))
federal_tax=fed_tax(income)
print("Federal Tax: ${:5.2f}" .format(federal_tax))
province_tax=prov_tax(income)
print("Province Tax: ${:5.2f}" .format(province_tax))
total_tax=federal_tax+province_tax
print("Total Tax: ${:5.2f}" .format(total_tax))
main()

Output

Enter your income: $200000
Federal Tax: $56500.00
Province Tax: $7500.00
Total Tax: $64000.00

Program Screenshot


Related Solutions

Federal Withholding Taxes versus Estimated Tax Payments 1. Summarize the difference between federal income tax withheld...
Federal Withholding Taxes versus Estimated Tax Payments 1. Summarize the difference between federal income tax withheld and federal estimated tax payments. 2. Summarize the general rule for federal estimated tax payments. You may use the following sources to research the answers: (1) learning objectives 9.1 and 9.2 of your text book, or IRS Publication 505 “Tax Withholding and Estimated Tax” for use in 2017 at https://www.irs.gov/pub
Three taxes: Sales Tax, Property Tax, and Income Tax. Name three types of taxes and analyze...
Three taxes: Sales Tax, Property Tax, and Income Tax. Name three types of taxes and analyze the deadweight loss of each. Which of these taxes do you believe create the highest deadweight loss? Why? Why is deadweight loss disagreed on by experts? Explain.
Assume the federal government replaces the federal income tax with a sales tax placed on consumption...
Assume the federal government replaces the federal income tax with a sales tax placed on consumption expenditures. Analyze the impact of this tax change on taxation efficiency and equity.
What are the various types of taxes that are levied by the federal government on individuals...
What are the various types of taxes that are levied by the federal government on individuals and businesses? What types of taxes are imposed by states and local governments on individuals and businesses? How are they similar and how do they differ? Does the federal government impose taxes for the same reasons as states and local governments?
Assume the federal government replaces the federal income tax with national sales tax on all consumption...
Assume the federal government replaces the federal income tax with national sales tax on all consumption expenditures. Analyze the impact of this tax change on taxation efficiency and equity. Note that the federal government already collects a nationwide consumption tax through excise taxes on gasoline, liquor, and tobacco.
TYPE ANSWERS 1. Be able to identify and calculate different types of taxes, the tax system...
TYPE ANSWERS 1. Be able to identify and calculate different types of taxes, the tax system in the United States, and important tax terminology Be able to prepare a comprehensive budget, and know how to classify different sources of income and expenses Understand contract terminology and terminology associated with checking and banking Know what a bank reconciliation is, its purpose, and the basic idea of how it is done
MPQ: Different Types of Taxes a. A progressive tax is one in which
MPQ: Different Types of Taxesa. A progressive tax is one in whichthe average rate increases as income increases.the average rate decreases as income increases.the average rate is constant as income increases.more taxes are paid as income increases.b. A regressive tax is one in whichthe average rate decreases as income increases.the average rate is constant as income increases.the same taxes are paid as income increases.the average rate increases as income increases.c. A proportional tax is one in whichthe average rate decreases...
Under the Federal Unemployment Tax Act (FUTA), __________ pay taxes to the __________, which deposit the...
Under the Federal Unemployment Tax Act (FUTA), __________ pay taxes to the __________, which deposit the money into the __________ government’s Unemployment Insurance Fund. Multiple Choice employees, states, federal employers, states, federal employees, federal government, state employers, federal government, state
when filing your federal tax return, which will cause taxes to be lower?
when filing your federal tax return, which will cause taxes to be lower?
Based on the federal tax chart, what are the taxes owed in the following situation Taxable...
Based on the federal tax chart, what are the taxes owed in the following situation Taxable income $1,500,000?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT