Lab 3: Functions and Selection Statements

Logistics

Learning Outcomes

Assignment

2023 Federal Tax Bracket

Note: the federal tax is progressive. For example, if a person has a taxable income of $15,000, the first $11,000 is taxed at a rate of 10% and the remaining $4,000 is taxed at a rate of 12%.

Rate For Unmarried Individuals, Taxable Income Over
10% $0
12% $11,000
22% $44,725
24% $95,375
32% $182,100
35% $231,250
37% $578,125

Grading - 10 points

Test Data

def main():
    process(10000)     # test case 1
    process(33333)     # test case 2
    process(65000)     # test case 3
    process(150000)    # test case 4
    process(222222)    # test case 5
    process(500000)    # test case 6
    process(1000000)   # test case 7

Expected Output for Test Data

The 2023 taxable income is $10000.00
An unmarried individual owes $1000.00

The 2023 taxable income is $33333.00
An unmarried individual owes $3779.96

The 2023 taxable income is $65000.00
An unmarried individual owes $9607.50

The 2023 taxable income is $150000.00
An unmarried individual owes $29400.00

The 2023 taxable income is $222222.00
An unmarried individual owes $49943.04

The 2023 taxable income is $500000.00
An unmarried individual owes $146894.50

The 2023 taxable income is $1000000.00
An unmarried individual owes $330332.00

If Time Remains

If you want to work with a partner on Program 1 (due 9/15), use this time to identify a partner or ask your lab TA to help you find someone. Note: For the vast majority of computing jobs and internships, the ability to work with one or more teammates is a crucial skill!