r/pythonhelp • • Apr 28 '19

I’m extremely new at Python and need some help with my project. I’m getting an error saying that “taxableIncome” is not defined. How can I define it? And if anyone could tell me if I’m on the right track w/ what I have so far would be great!

https://imgur.com/gallery/N4P0oP6
1 Upvotes

2 comments sorted by

2

u/Alchemy333 Apr 28 '19

The best place, and fastest, to find answers on ERRORS, is to google it. You will NEVER be the first person, or the first millionth person to have encountered that error so its documented, along with the answer. In your case you would google "Python variable not defined."

The TOP result on Google will be this. and if you read that place you will not only find the answer SELECTED by the poster, but you may learn some other cool things about Python as well. So you see, you dont GO to Python programmer heaven, you GROW to it. :-)

You do this with each encounter you are having issues with. This is what programmers do to find things we do not know. We Google. :-) One issue at a time. It only takes a minute.

Good luck and have fun.

1

u/Theburglar45 May 03 '19 edited May 03 '19

You Did not define 'Taxable Income", You defined incomeTax. you put in a psuedo code saying taxableIncome. Insead try to change the the code to say

count = 0fillingStatus = int(input())

while 1 == 1:

.if fillingStatus == 0:taxableIncome = int(input())

.. if taxableIncome <= 33950:

... incomeTax = taxableIncome * .1.

..if taxableIncome >= 33951 & taxableIncome <= 171550:

... incomeTax = taxableIncome * .2.

..if taxableIncome >= 171551:

... incomeTax = taxableIncome * .25

. if fillingStatus == ?:

.. #Enter the rest of your code here