Write a python function to check if number is divisible by all the digits


Topic: Write a python function to check if number is divisible by all the digits

Solution

def allDigitsDivide( n) :
     
    temp = n
    while (temp > 0) :
        digit = temp % 10
        if not (digit != 0 and n % digit == 0) :
            return False
 
        temp = temp // 10
     
    return True
	
	



List all Python Programs