human
Harshad ( Or Niven ) Number | Python implementation of above approach.
Converting integer to string.
Initialising sum to 0.
Traversing through the string.
Converting character to int.
Comparing number and sum.
Driver Code.
passing this number to get result function"
How can the above be solved in Python?
assistant
#Here is code to harshad ( Or Niven ) Number and the other steps required.
 def checkHarshad ( n ) :
	st = str ( n )
	sum = 0
	length = len ( st )
	for i in st :
		sum = sum + int ( i )
	if ( n % sum == 0 ) :
		return " Yes "
	else :
		return " No "
number = 18
print ( checkHarshad ( number ) )