human
Check if sum of digits of a number exceeds the product of digits of that number | Function to check if the sum of the digits of N is strictly greater than the product of the digits of N or not.
Stores the sum and the product of the digits of N.
Stores the last digit if N.
Increment the value of sumOfDigits.
Update the prodOfDigit.
Divide N by 10.
Print the result.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to check if sum of digits of a number exceeds the product of digits of that number and the other steps required.
 def check ( n ) :
	sumOfDigit = 0
	prodOfDigit = 1
	while n > 0 :
		rem = n % 10
		sumOfDigit += rem
		prodOfDigit *= rem
		n = n // 10
	if sumOfDigit > prodOfDigit :
		print ( " Yes " )
	else :
		print ( " No " )
N = 1234
check ( N )