YouTip LogoYouTip

Python3 Func Number Hypot

# Python3.x Python3 hypot() Function [![Image 3: Python3 Numbers](#) Python3 Numbers](#) * * * ## Description **hypot()** returns the Euclidean norm, sqrt(x*x + y*y). * * * ## Syntax The syntax for the hypot() method is: import math math.hypot(x, y) **Note:** hypot() cannot be accessed directly; you need to import the math module and then call the method via the math static object. * * * ## Parameters * x -- A numeric value. * y -- A numeric value. * * * ## Return Value Returns the Euclidean norm, sqrt(x*x + y*y). * * * ## Example The following example demonstrates the use of the hypot() method: #!/usr/bin/python3import math print ("hypot(3, 2) : ", math.hypot(3, 2))print ("hypot(-3, 3) : ", math.hypot(-3, 3))print ("hypot(0, 2) : ", math.hypot(0, 2)) The output of the above example is: hypot(3, 2) : 3.605551275463989 hypot(-3, 3) : 4.242640687119285 hypot(0, 2) : 2.0 [![Image 4: Python3 Numbers](#) Python3 Numbers](#)
← Python3 Func Number HypotPython3 Func Number Atan2 β†’