human
Check if Decimal representation of an Octal number is divisible by 7 | Function to check Divisibility.
Sum of all individual digits.
Condition.
Driver Code.
Octal number"
Solution in Python:
 What is a code to check if Decimal representation of an Octal number is divisible by 7 and the other steps required?
assistant
#Here is code to check if Decimal representation of an Octal number is divisible by 7 and the other steps required.
 def check ( n ) :
	sum = 0
	while n != 0 :
		sum += n % 10
		n = n // 10
	if sum % 7 == 0 :
		return 1
	else :
		return 0
if __name__ == " _ _ main _ _ " :
	n = 25
	print ( ( " YES " ) if check ( n ) == 1 else print ( " NO " ) )