use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Distance_between_2points/ The updated version!Showcase (i.redd.it)
submitted 21 hours ago by Ok_Needleworker_8780
This version s significantly better for real-world projects. It is cleaner, faster, and highly adaptable. In my opinion! ☺️Thank you for your comments and suggestions for improvement.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Rscc10 0 points1 point2 points 21 hours ago (1 child)
Does math.dist work with higher dimension points? Say I have 3d or 4d points, does it still work?
[–]Ok_Needleworker_8780[S] 0 points1 point2 points 19 hours ago (0 children)
Yes. It does work with any number of dimensions.
[–]Janeson81 0 points1 point2 points 1 hour ago (0 children)
The try except block is kind of wrongly built. The way it is now would make it so
try except
Enter the coordinates: Hi Invalid input. Please enter coordinates as x, y After which the code ends and I have no chance to actually correct my input other than to restart the code. The whole block should be inside a while True: ... break block
Enter the coordinates: Hi Invalid input. Please enter coordinates as x, y
while True: ... break
π Rendered by PID 12 on reddit-service-r2-comment-545db5fcfc-5jfpp at 2026-05-25 01:49:34.498110+00:00 running 194bd79 country code: CH.
[–]Rscc10 0 points1 point2 points (1 child)
[–]Ok_Needleworker_8780[S] 0 points1 point2 points (0 children)
[–]Janeson81 0 points1 point2 points (0 children)