Returns number of digits in n
def countDigits ( n ) : NEW_LINE INDENT temp = n ; NEW_LINE c = 0 ; NEW_LINE while ( temp != 0 ) : NEW_LINE INDENT temp = int ( temp / 10 ) ; NEW_LINE c += 1 ; NEW_LINE DEDENT return c ; NEW_LINE DEDENT