human
Can you provide a code to square root of an integer and the other steps required given the following:
Square root of an integer | Returns floor of square root of x.
Base cases.
Starting from 1 , try all numbers until i * i is greater than or equal to x ..
Driver Code"
Solution in Python:
assistant
#Here is code to square root of an integer and the other steps required.
 def floorSqrt ( x ) :
	if ( x == 0 or x == 1 ) :
		return x
	i = 1 ; result = 1
	while ( result <= x ) :
		i += 1
		result = i * i
	return i - 1
x = 11
print ( floorSqrt ( x ) )