human
Give me a code to number obtained by reducing sum of digits of 2 N into a single digit and the other steps required given the following:
Number obtained by reducing sum of digits of 2 N into a single digit | Function to find the number obtained by reducing sum of digits of 2 ^ N into a single digit.
Stores answers for different values of N.
Driver Code"
Solution in Python:
assistant
#Here is code to number obtained by reducing sum of digits of 2 N into a single digit and the other steps required.
 def findNumber ( N ) :
	ans = [ 1 , 2 , 4 , 8 , 7 , 5 ]
	return ans [ N % 6 ]
if __name__ == " _ _ main _ _ " :
	N = 6
	print ( findNumber ( N ) )