human
Check if a large number is divisible by 2 , 3 and 5 or not | function to return sum of digits of a number.
function to Check if a large number is divisible by 2 , 3 and 5 or not.
Driver code"
Solution in Python:
assistant
#Here is code to check if a large number is divisible by 2 , 3 and 5 or not and the other steps required.
 def SumOfDigits ( str , n ) :
	sum = 0
	for i in range ( 0 , n ) :
		sum += int ( ord ( str [ i ] ) - ord ( '0' ) )
	return sum
def Divisible ( str , n ) :
	if ( ( SumOfDigits ( str , n ) % 3 == 0 and str [ n - 1 ] == '0' ) ) :
		return True
	return False
if __name__ == " _ _ main _ _ " :
	str = "263730746028908374890"
	n = len ( str )
	if ( Divisible ( str , n ) ) :
		print ( " YES " )
	else :
		print ( " NO " )