Home >>Python math Module >Python math.hypot() Method
Python math.hypot() method in python is used to returns the Euclidean norm, sqrt(x*x, y*y). Euclidean norm – is the length of the vector from the origin to point (x,y) , where x and y are perpendicular and base.
Syntax:math.hypot(x1, x2, x3, ..., xn)
Parameter | Description |
---|---|
x1, x2, x3, ..., xn | It is required to represent coordinates between the two numbers and more |
import math
parendicular = 2
base = 15
print (math.hypot(parendicular, base))
import math
x = 6
y = 2
print(math.hypot(x,y))
x = 6.8
y = 4.14
print(math.hypot(x,y))
x = 5
y = 1
print(math.hypot(x,y))
x = 6
y = -1
print(math.hypot(x,y))
x = -9
y = 2
print(math.hypot(x,y))
x = -4
y = -6
print(math.hypot(x,y))