python求立方根函数如何写
python求立方根函数如何写
在python中使用pow函数求立方根,具体方法以下:
pow:pow()函数的作用是返回 xy(x 的 y 次方)的值。
pow()函数语法:
math.pow( x, y )
pow()函数使用方法:
import math # 导入 math 模块
print "math.pow(100, 3) : ", math.pow(100, 3)
print "math.pow(90, 3) : ", math.pow(90, 3)
输出结果为:
math.pow(100, 3) :1000000
math.pow(90, 3) :729000
文章来源:丸子建站
文章标题:python求立方根函数如何写
https://www.wanzijz.com/view/4416.html