TypeError: 'float' object has no attribute 'getitem' What does this mean ???
This code is not indented, so it can't run. Notice that the power operator is `**`, not `^`, python is not latex. Also when there is an error, python outputs a long message, starting with the word Traceback (most recent call last). To find the error, you must analyze this … Read More
OK, I can see your getting flustered, so let's back away from the code for a bit and consider the overall problem you are trying to solve. Just what is the program supposed to compute, and how would you do it by hand if you had to? I don't mean … Read More
Ah, this does clarify things somewhat. OK, then. I think you'll want to fix `calcdist()` first; divorce it from the data stream as it is and have it take two three-tuples as it's argument: def (a, b): return sqrt((a-b)**2 + (a-b)**2 + (a-z)**2) Better still might be to write a … Read More
Edited by Gribouillis
Edited by Schol-R-LEA