What is math.hypot() in Python?
The math.hypot() function is used to calculate the
Syntax
math.hypot(x1, x2, ..., xn)
Parameters
x1, x2, ..., xn: Two or more points representing coordinates.
Return value
This function will return a primitive float value with a Euclidean norm, i.e., sqrt( + )
Example
math.hypot() takes multiple points as an argument.
# Load math Libraryimport math#print the Euclidean normprint(math.hypot(10, 16))print(math.hypot(6, 9, 11))print(math.hypot(9, 3, 6, 13))print(math.hypot(10, 5, 3, 11, 23))