Project 3(2) - s3.amazonaws.com

advertisement
Foundations of Programming, Data Structures, and Algorithms
Project 3
Description: For project 3 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–
At least
But less than
And you are–
Single
Married filing jointly
0
1001
2001
3001
4001
5001
Your tax is–
100
200
330
480
610
1500
1000
2000
3000
4000
5000
And above
150
350
480
660
950
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
Project 1
Foundations of Programming, Data Structures, and Algorithms
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
Turn In:
1. Turn in the program source code as a .py file.
Grading Criteria:
This program is worth 100 points. Points will be distributed via the following table:





Clear message stating what the program does. (10 points)
Correct inputs (10 point)
Calculations are correct (30 points)
Output is clear and correct (30 points)
Output written to file (20 points)
Project 1
Download