Subject Computer Science Python Programming

Question

For project we are going to create a program to complete the IRS 1040EZ form, which is a personal income tax form normally used by people that do not have a lot of deductions. Attached is a copy of the form. The 1040EZ form has only 14 questions on it. Some questions are calculations which your program should calculate automatically. Your program should print a title on the screen stating what the program does. Do not worry about the fields like Name, address, etc. Your program should begin at question 1, “Wages, salaries, and tips. This should be shown in box 1 of your Form(s) W-2.” Have the user enter each number. When a line requires a calculation, like line 4 “Add lines 1, 2, and 3. This is your adjusted gross income.”, display the text of the line and the result of the calculation. The program should do the calculations.

To make things a little easier here are a few exceptions:
1. Line 8a and 8b require you to look at the instructions, which you do not have to do for this project. Assume that both line 8a and 8b are 0.
2. You can just put 0 in for line 11.
3. In Line 10 it states to check the tax table. Use the Tab Table below. The Tax Tables in the instructions is too big.

Tax Table
If Form 1040EZ, line 6, is–
And you are–
At least
But less than
Single
Married filing jointly
Your tax is–
0
1000
100
150
1001
2000
200
350
2001
3000
330
480
3001
4000
480
660
4001
5000
610
950
5001
And above
1500
1750
The program also needs to write each line with the corresponding number (from the user or calculated) to a file.

Sample 1
This program will help you complete the 1040EZ form.
1. Wages, salaries, and tips. This should be shown in box 1 of your Form(s) W-2.
>> 59100.50
2. Taxable interest. If the total is over $1,500, you cannot use Form 1040EZ.
>> 52.25
3. Unemployment compensation and Alaska Permanent Fund dividends.
>> 0.00
4. Add lines 1, 2, and 3. This is your adjusted gross income.
Your adjusted gross income is 59,152.75
5. If someone can claim you (or your spouse if a joint return) as a dependent, check the applicable box(es) below and enter the amount from the worksheet on back.
Enter Y for your and S for Spouse
>> Y
Then line 5 is 10,150
6. Subtract line 5 from line 4. If line 5 is larger than line 4, enter -0-. This is your taxable income.
49,002.75
7. Federal income tax withheld from Form(s) W-2 and 1099.
>> 7550.15
8. Earned income credit 0.00
9. Add lines 7 and 8a. These are your total payments and credits. 7550.15
10. Tax. Use the amount on line 6 above to find your tax in the tax table in the instructions. Then, enter the tax from the table on this line. Your taxes owed are 1500.
11. Health care: individual responsibility 0.00
12. Add lines 10 and 11. This is your total tax.
150
13. If line 9 is larger than line 12, subtract line 12 from line 9. This is your refund. 6050.12
14. If line 12 is larger than line 9, subtract line 9 from line 12. This is the amount you owe. 0.00

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

print("This program will help you complete the 1040EZ form.")

q1 = float(input("\n1. Wages, salaries, and tips. This should be shown in box 1 of your form(s) W-2.\n>> "))
q2 = float(input("\n2. Taxable interest. If the total is over $1,500, you cannot use Form1040EZ.\n>> "))
q3 = float(input("\n3. Unemployment compensation and Alaska Permanent Fund dividends.\n>> "))
q4 = q1 + q2 + q3
print("\n4. Add lines 1, 2, and 3. This is your adjusted gross income.\nYour adjusted gross income is %.2f " % q4)

q5_yn = input("\n5. If someone can claim you (or your spouse if a joint return) as a dependent,\ncheck the applicable box(es) below " +
          "and enter the amount from the worksheet on \nback\nEnter Y for You and S for Spouse\n>> ")
while q5_yn!="Y" and q5_yn!="S" and q5_yn!="y" and q5_yn!="s":
    print("\nInvalid response! Please re-enter the response.")
    q5_yn = input("\n5. If someone can claim you (or your spouse if a joint return) as a dependent,\ncheck the applicable box(es) below " +
          "and enter the amount from the worksheet on\nback\nEnter Y for You and S for Spouse\n>> ")
q5_yn.upper()
if q5_yn=="Y":
    q5_amount=10150
elif q5_yn=="S":
    q5_amount=20300
print("\nThen line 5 is %.2f" % q5_amount)...

This is only a preview of the solution. Please use the purchase button to see the entire solution

$25.00

or free if you
register a new account!

Assisting Tutor

Related Homework Solutions

Get help from a qualified tutor
Live Chats