Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PROBLEM 3: FEDERAL INCOME TAX PYTHON Introduction: In Canada, we pay federal and provincial income tax. According to the Canadian Government, the federal tax brackets

PROBLEM 3: FEDERAL INCOME TAX

PYTHON

Introduction:

In Canada, we pay federal and provincial income tax. According to the Canadian Government, the federal tax brackets for 2023 are:

15% on the portion of taxable income that is $53,359 or less, plus

20.5% on the portion of taxable income over $53,359 up to $106,717, plus

26% on the portion of taxable income over $106,717 up to $165,430, plus

29% on the portion of taxable income over $165,430 up to $235,675, plus

33% on the portion of taxable income over $235,675

Your job is to determine the tax bracket for a give taxable income.

Input:

The program must read one line of input:

Input the taxable income (integer) and store it to an appropriately named variable.

Note

In this problem, were only interested in the integer portion of the income.

Processing:

Your program must:

Calculate the federal tax bracket for the inputted income.

Output:

Use f-strings to format the output in the following manner:

Income: $999,999 Bracket: 9 

Examples:

Input Output
90000 Income: $90,000 Bracket: 2
500000 Income: $500,000 Bracket: 5
126717 Income: $106,717 Bracket: 2
106718 Income: $106,718 Bracket: 3
235675 Income: $235,675 Bracket: 4

image text in transcribed

\# INPUT SECTION: \# WRITE YOUR CODE HERE \# PROCESSING SECTION: \# WRITE YOUR CODE HERE \# OUTPUT SECTION: \# WRITE YOUR CODE HERE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions