(Sep-16-2020, 09:11 PM)micseydel Wrote:(Sep-16-2020, 09:06 PM)Jeff_F Wrote: Did you try it out? I tried out the fix I suggested and I didn't get an error message.What was the exact code you tried?
I simply added a line of code to initialize numb to zero. It got past the error and it seems to work fine.,
#print(m) numb = 0 for i in range(0, m): x = i y = i + 1 numb.x=int(str(lista[0 + i*4]) + str(lista[2 + i*4])) numb.y=int(str(lista[1 + i * 4]) + str(lista[3 + i * 4])) numb.i= (numb.x) + (numb.y) chr(a.i) print(chr(a.i), end=" ")
Here's the results after I initialize numb to zero. I have no idea what the code is supposed to do but it works up to the this point. Some comments would be nice to let us know what you're trying to accomplish.,
Quote:Traceback (most recent call last):
File "<module1>", line 54, in <module>
NameError: name 'a' is not defined