sympy.sqrt(number)方法
在sympy.sqrt()方法的帮助下,我们可以用sympy.sqrt()方法求出任意数的平方根。
语法:sympy.sqrt(number)
返回:返回任意数的平方根。
sympy.sqrt(number) 例# 1:
在本例中,我们可以看到,通过使用sympy.sqrt()方法,我们可以得到任意数字的平方根。
# import sympy import sympy # Use sympy.sqrt() method num = sympy.sqrt(10) print(num)
Output :
sqrt(10)
sympy.sqrt(number) 例# 2:
# import sympy import sympy # Use sympy.sqrt() method num = sympy.sqrt(36) print(num)
Output :
6
版权声明:本页面内容旨在传播知识,为用户自行发布,若有侵权等问题请及时与本网联系,我们将第一时间处理。E-mail:284563525@qq.com