human
Check whether product of digits at even places is divisible by sum of digits at odd place of a number | Below function checks whether product of digits at even places is divisible by sum of digits at odd places.
Converting integer to string.
Traveersing the string.
Driver code"
Solution in Python:
 Can you provide a code to check whether product of digits at even places is divisible by sum of digits at odd place of a number and the other steps required?
assistant
#Here is code to check whether product of digits at even places is divisible by sum of digits at odd place of a number and the other steps required.
 def productSumDivisible ( n ) :
	sum = 0
	product = 1
	num = str ( n )
	for i in range ( len ( num ) ) :
		if ( i % 2 != 0 ) :
			product = product * int ( num [ i ] )
		else :
			sum = sum + int ( num [ i ] )
	if ( product % sum == 0 ) :
		return True
	return False
if __name__ == " _ _ main _ _ " :
	n = 1234
	if ( productSumDivisible ( n ) ) :
		print ( " TRUE " )
	else :
		print ( " FALSE " )