Here is the code of finding the square root of 50 using Guess and Check and Bisection algorithms.
#Finding the square root of 50 using Guess and Check and Bisection algorithms.
square = 50
low = 0
high = square
guess = (high + low) / 2
error = 0.000000001
while abs(guess**2 - square) >= error:
if guess**2 < square:
low = guess
else:
high = guess
guess = (high + low) / 2.0
print(guess, 'is the approx square root of 50.')
# This code is contributed by Ahmad Shafiq
.