Python | sympy.ntheory.primetest.is_square() method

With the help of sympy.ntheory.primetest.is_square() method, we can find that weather an integer is perfect square or not that is passed as a parameter in the sympy.ilcm() method and returns a boolean value.
Syntax :
sympy.ntheory.primetest.is_square(val)
Return : Return boolean value.
Example #1 :
In this example we can see that by using sympy.ntheory.primetest.is_square() method, we are able to find that weather an integer if perfect square or not that is passed as parameters.
# import sympy from sympy.ntheory.primetest import is_square # Using sympy.ntheory.primetest.is_square() method gfg = is_square(16) print(gfg) |
Output :
True
Example #2 :
# import sympy from sympy.ntheory.primetest import is_square # Using sympy.ntheory.primetest.is_square() method gfg = is_square(24) print(gfg) |
Output :
False



