InferenceAI

Enter at least two characters to search.

Start free

Euclidean Distance

easyEmbeddings12 min10 XP

Return the Euclidean distance between equal-length vectors, rounded to six decimals.

Examples

EXAMPLE WALKTHROUGH3-4-5

A guided view of the published example, not a trace of your code.

INPUT[[0,0],[3,4]]
TASKeuclidean_distance()
EXPECTED OUTPUT5

Start with the input values shown in this example.

Example 1 of 2

Input: a = [0,0], b = [3,4]

Output: 5

Explanation: 3-4-5

Input: a = [1,2], b = [1,2]

Output: 0

Explanation: same

Hint 1

Sum squared coordinate differences, then take the square root.

Topics

PythonEmbeddings