描述
Python3 hypot() 返回欧几云计里德范数 sqrt(x*x + y*y)。
语法
以下是 hy算开pot() 方法的语法:
import math
mat发:h.hypot(x, y)
注意:hypot()是不能Py直接访问的,需要导入 math 模块,然后通过 mathth 静态对象调用该方法。
参数
x -- 一个数值。
y -- 一个on数值。
返回值
返回欧几里德范数 sqrt(x*x + y3三*y)。
实例
以下展示了使用 hypot() 方法的实例角函:
以上实例运行后输出结果为:
电话:020-123456789
传真:020-123456789
Copyright © 2026 Powered by 万家灯火网 https://tmpi-quickclean.com/