Apr-25-2019, 06:59 PM
This seems to be something that a lot of new people to python seem to struggle with, and I'm no exception....
I understand that appending the values is something I need to do, but.. I'm obviously not doing it QUITE right..
This is my code:
I understand that appending the values is something I need to do, but.. I'm obviously not doing it QUITE right..
This is my code:
x=0 dist=[] while x < 100: dist.append(x) dist[x]=400/(math.cos(angle)) print (dist[x]) x = x+1Where angle comes from earlier in the code. But I still get the list assignment out of range error. What am I doing wrong?