Question
In Canada, we pay federal and provincial income tax. According to the Canadian Government, the federal tax rates for 2022 are: 15% on the first
In Canada, we pay federal and provincial income tax. According to the Canadian Government, the federal tax rates for 2022 are:
- 15% on the first $50,197 of taxable income
- 20.5% on the next $50,195 of taxable income (on the portion of taxable income over 50,197 up to $100,392)
- 26% on the next $55,233 of taxable income (on the portion of taxable income over $100,392 up to $155,625)
- 29% on the next $66,083 of taxable income (on the portion of taxable income over 155,625 up to $221,708)
- 33% of taxable income over $221,708
There are five ranges of taxable income with different rates for each. Such a range of taxable income is referred to as a tax bracket.
Your job is to determine in which tax bracket a person's taxable income would be.
INPUT:
The program must read one line of input:
- The taxable income (integer) for which you must determine the tab bracket.
NOTE: For this problem, we will deal with only the integer portion of taxable income. There won't be any decimal amounts.
PROCESSING:
Determine in which of the federal tax brackets (1, 2, 3, 4, or 5) the inputted taxable income would fall. To determine this, use the limits for each tax bracket as given in the Introduction above.
OUTPUT:
Use an f-string to format the taxable income with commas in the following manner:
Taxable income of $123,456 is in tax bracket 3.
The language being used is Phython
Exit Full Screen prob2.py + New 1 ## 2 # CSCI 1503 3 # Assignment 2, Problem 2 4 # Author: *** PLEASE PUT YOUR NAME HERE *** 5 # 7- # Input section: 8 # Write your code inputting the taxable income here 9 # 10 11 12 13 14 15 - # Process section: 16 # Write your code to determine the tax bracket (1, 2, 3, 4, or 5) for the taxable income here 17 18 19 20 21 22 # 23 - # Output section: 24 # Write your code for outputting the taxable income and tax bracket in proper format here 25 # 26 27 #Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started