How to get both the values of fractional power or sqrt function in python?

前端 未结 0 1422
时光说笑
时光说笑 2021-02-03 17:25

For example square root of 25 is +5 and -5. But in python we get only the positive values.

import math
x=math.sqrt(25)
y=16**0.25
print(x,y)

We g

相关标签:
回答
  • 消灭零回复
提交回复
热议问题