math.sqrt()
函数:返回一个数的平方根。首先需要导入 math
模块。例如:
import math x = 16 print("The square root of", x, "is", math.sqrt(x))
输出:
The square root of 16 is 4.0
math.sqrt()
函数:返回一个数的平方根。首先需要导入 math
模块。例如:
import math x = 16 print("The square root of", x, "is", math.sqrt(x))
输出:
The square root of 16 is 4.0