Zuckerman Numbers | Function to get product of digits ; Function to check if N is an Zuckerman number ; Driver code
def getProduct ( n ) : NEW_LINE INDENT product = 1 NEW_LINE while ( n > 0 ) : NEW_LINE INDENT product = product * ( n % 10 ) NEW_LINE n = n // 10 NEW_LINE DEDENT return product NEW_LINE DEDENT def isZuckerman ( n ) : NEW_LINE INDENT return n % getProduct ( n ) == 0 NEW_LINE DEDENT N = 115 NEW_LINE if ( isZuckerman ( N ) ) : NEW_LINE INDENT print ( " Yes " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " No " ) NEW_LINE DEDENT