+ 1

Python core 55.2 tuples exercise

Could someone explain the maths to me in the above exercise. I had to look up the solution and although the code makes sense I'm not grasping the equation.

26th Apr 2022, 11:57 AM
John
1 Antwort
+ 3
It's nothing but geometry: We calculate the Euclidean distance between 2 coordinates using the Pythagoras theorem. https://www.cliffsnotes.com/study-guides/geometry/coordinate-geometry/distance-formula
26th Apr 2022, 12:43 PM
Lisa
Lisa - avatar