def mysqrt(a):
    """Calculate the square root of a number 'a'"""
    x = a / 5  # initial aproximation of the result
    epsilon = 0.0000001  # indicates the result closest aproximation accepted
    while True:
        y = (x + a / x) / 2
        if abs(y - x) < epsilon:
            return y
        x = y