# finding the square root of a number

# get the number from the user
user_input = input("please enter a real number: ")
number = float(user_input)

# find the square root
root = 1.0
times = 0
while abs(root * root - number) > 0.0000001:
    times = times + 1
    root = (root + number/root) / 2

# print out the result
print("the root of", number, "is", root)
print("times =", times)

    
