def is_square(num):
    """Determines if a positive integer *num* is the perfect square.
    
    :param num: Integer to be checked
    :returns: A tuple (is_square,root)
    
    .. note::
       
       * *is_square* is *True* if *num* is a perfect square. 
       * The integer *root* <= (square root of *num*).
    
    Uses `Digit-by-digit algorithm 
    <http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Digit-by-
    digit_calculation>`_ in base 10.
    """
    if(num == 0):
        pn = 0
        rn = 1
    else:
        z = num
        test = []
        while(z !=0):
            test.append(z%100)
            z = z//100
        test.reverse()
        pn = 0
        rn = 0
        for i in range(len(test)):
            #get an estimate of xn
            c = 100*rn + test[i]
            xn = 1
            while ((20*pn+xn)*xn <= c):
                xn += 1
            xn -= 1
            rn = c - (20*pn+xn)*xn
            pn = pn*10 + xn
    if(rn == 0):
        return (True,pn)
    else:
        return (False,pn)