Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Final Project Help
#5
Switched everything out and the code works as long as I don't put in a . if i do i get this error
Traceback (most recent call last):
File "C:\Users\BlackPearl\Desktop\Project one\final.py", line 4, in <module>
t[0] = int(input ("Wages, salaries, and tips. This should be shown in box 1 of your Forms(s)W-2. Attach your Form(s) W-2."))
ValueError: invalid literal for int() with base 10: '100050.00'

Here is the code
print("Welcome to the 1040EZ Tax Form Application")
t = ["","",""]
x = [""]
t[0] = int(input ("Wages, salaries, and tips. This should be shown in box 1 of your Forms(s)W-2. Attach your Form(s) W-2."))
t[1] = int(input ("Taxable interest."))
t[2] = int(input ("Unemployment compensation and Alaska Permanent Fund dividends."))
t4 = print("Add lines 1, 2, and 3. This is your adjusted gross income.", + t[0] + t[1] + t[2])
x = 10150
t = t[0] + t[1] + t[2] - x
print("If no one can claim you (or your spouse if a joint return), enter $10,150 if single; $20,300 if married filing jointly. See back for explanation.", x)
print("Subtract line 5 from line 4.", t)
z = ["",""]
z[0] = int(input ("Federal income tax withheld from Form(s) W-2 and 1040."))
z[1] = int(input ("Earned income credit (EIC)"))
print('Add lines 7 and 8. These are your total payments and credits. {}'. format(+ z[0] + z[1]))
b = [""]
b[0] = t * 0.02
print("Tax. Multiply Line 6 by 0.15.", b)
d = [""]
d[0] = int(input ("Health care: individual responsibility"))
c = [""]
c[0] = print("Add lines 10 and 11. This is your total tax.", b[0] + d[0])
print("If line 9 is larger than line 12, subtract line 12 from line 9. This is your refund.")
update:
I changed it to float instead of int and that seems to have fixed the . issue. Thanks so much for the help
Reply


Messages In This Thread
Final Project Help - by hyg71886 - Feb-05-2019, 03:06 PM
RE: Final Project Help - by ichabod801 - Feb-05-2019, 04:00 PM
RE: Final Project Help - by hyg71886 - Feb-05-2019, 04:04 PM
RE: Final Project Help - by ichabod801 - Feb-05-2019, 08:57 PM
RE: Final Project Help - by hyg71886 - Feb-06-2019, 01:36 AM
RE: Final Project Help - by ichabod801 - Feb-06-2019, 03:12 AM
RE: Final Project Help - by micseydel - Feb-07-2019, 01:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Smile Final Projet - Credit Risk Rauchvant 3 2,445 Nov-18-2020, 03:21 PM
Last Post: Rauchvant
  Help needed, stuck at the final output extricate 0 1,543 Jun-20-2020, 05:35 AM
Last Post: extricate
  Final Project (Databases, GUI, and Classes) poochenthecreator 1 1,652 Apr-27-2020, 09:58 PM
Last Post: deanhystad
  Trouble with edX Python Final sarah_mb_sues 11 13,770 Jun-19-2018, 10:36 AM
Last Post: cryomick
  Final problem Truman 4 4,029 Jan-22-2018, 11:42 PM
Last Post: Truman

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020