human
Check whether a + b = c or not after removing all zeroes from a , b and c | Function to remove zeroes.
Initialize result to zero holds the Result after removing zeroes from no.
Initialize variable d to 1 that holds digits of no.
Loop while n is greater then zero.
Check if n mod 10 is not equal to zero.
store the result by removing zeroes And increment d by 10.
Go to the next digit.
Return the result.
Function to check if sum is true after Removing all zeroes ..
Call removeZero ( ) for both sides and check whether they are equal After removing zeroes ..
Driver code"
How can the above be solved in Python?
 ... Write me a code to check whether a + b = c or not after removing all zeroes from a , b and c and the other steps required?
assistant
#Here is code to check whether a + b = c or not after removing all zeroes from a , b and c and the other steps required.
 def removeZero ( n ) :
	res = 0
	d = 1
	while ( n > 0 ) :
		if ( n % 10 != 0 ) :
			res += ( n % 10 ) * d
			d *= 10
		n //= 10
	return res
def isEqual ( a , b ) :
	if ( removeZero ( a ) + removeZero ( b ) == removeZero ( a + b ) ) :
		return True
	return False
a = 105
b = 106
if ( isEqual ( a , b ) ) :
	print ( " Yes " )
else :
	print ( " No " )