human
Check if the sum of digits of number is divisible by all of its digits | Function that returns true if all the digits of n divide the sum of the digits of n.
Store a copy of the original number.
Find the sum of the digits of n.
Restore the original value.
Check if all the digits divide the calculated sum.
If current digit doesn 't  divide the sum.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to check if the sum of digits of number is divisible by all of its digits and the other steps required.
 def isDivisible ( n ) :
	temp = n
	sum = 0
	while ( n ) :
		digit = n % 10
		sum += digit
		n //= 10
	n = temp
	while ( n ) :
		digit = n % 10
		if ( sum % digit != 0 ) :
			return False
		n //= 10 ;
	return True
n = 123
if ( isDivisible ( n ) ) :
	print ( " Yes " )
else :
	print ( " No " )