human
Count of Octal numbers upto N digits | Function to return the count of natural octal numbers upto N digits.
Loop to iterate from 1 to N and calculating number of octal numbers for every ' i ' th digit ..
Driver code"
Solution in Python:
assistant
#Here is code to count of Octal numbers upto N digits and the other steps required.
 def count ( N ) :
	sum = 0 ;
	for i in range ( N + 1 ) :
		sum += 7 * ( 8 ** ( i - 1 ) ) ;
	return int ( sum ) ;
if __name__ == " _ _ main _ _ " :
	N = 4 ;
	print ( count ( N ) ) ;