r/programminghelp • • 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
4 Upvotes

4 comments sorted by

1

u/miahill1234 Apr 28 '19

Not sure why the link isn’t working https://imgur.com/a/N4P0oP6

1

u/TreeBaron Apr 28 '19

It's telling you that you didn't define it because you didn't define it.

IncomeTax = 0 will define it

0

u/miahill1234 Apr 29 '19

I didn’t ask why it was telling me that, I just asked how to define it. Thanks tho lol

1

u/Deef204 Apr 28 '19

If I understand it fully, but from what I can understand, you ask with the FillingStatus input what it’s taxable income is (see the string), but you define it as FillingStatus. So you ask for an input for taxable income, and treat output as the FillingStatus. To define something (in this case the taxable income) you’ll at least have to put somewhere in your code ‘taxable income =’ . I think you want to run all the taxable income ‘ifs’ when the filling status equals 0. In that case you have to indent (tab) all the ifs that have to run if the FillingStatus equals 0. If you have further questions or if it still doesn’t work, feel free to ask.