Skip to content

new updates + cases tested #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

corrinerojas
Copy link

No description provided.

for n in points:
lowest = 100
for x in points:
if euclidean_distance(n,x)!= 0 and euclidean_distance(n,x) < lowest:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the points are coincident (and valid)? You might have a distance of 0. You have two for loops, so you could check to see if the position (index) in the first for loop is the same as the index in the second. Check out enumerate to help do this.

@jlaura
Copy link
Contributor

jlaura commented Mar 1, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants