human
Write me a code to euler 's criterion (Check if square root under modulo p exists) and the other steps required given the following:
Euler 's criterion (Check if square root under modulo p exists) | Returns true if square root of n under modulo p exists.
One by one check all numbers from 2 to p - 1.
Driver Code"
Solution in Python:
assistant
#Here is code to euler 's criterion (Check if square root under modulo p exists) and the other steps required.
 def squareRootExists ( n , p ) :
	n = n % p
	for x in range ( 2 , p , 1 ) :
		if ( ( x * x ) % p == n ) :
			return True
	return False
if __name__ == ' _ _ main _ _ ' :
	p = 7
	n = 2
	if ( squareRootExists ( n , p ) == True ) :
		print ( " Yes " )
	else :
		print ( " No " )