python中三种开根方的写法
python中三种开根方的写法

python中三种开根方的写法

这个标题就很茴香豆呀!

1. 使用运算符**, y = x ** 0.5;

2. 使用内置函数pow(), y = pow(x, 0.5);

3. 调用math库中的函数sqrt(), y = math.sqrt(x);

参考链接:https://www.php.cn/python-tutorials-423460.html

一条评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注