I have a little problem to solve .. i have a array with x, y, z co-ordinates in it as a tuple. I am trying to find the distance between each point and sorting the points according to the min distance. Can soemone help me with the algorithm ??
Inshu
0
Newbie Poster
Recommended Answers
Jump to PostStart by printing x, y, and z. And print the return. These are always good places to start.
def calcdist(data): for p in data: x = p[:1] y = p[:2] z = p[:3] print "x, y, and z =", x, y, z for i in range(len(data)): dist …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.