human
Number of N digit integers with weight W | Function to find total possible numbers with n digits and weight w.
When Weight of an integer is Positive.
Subtract the weight from 9.
When weight of an integer is negative.
add the weight to 10 to make it positive.
number of digits in an integer and w as weight.
print the total possible numbers with n digits and weight w"
Solution in Python:
 What is a code to number of N digit integers with weight W and the other steps required?
assistant
#Here is code to number of N digit integers with weight W and the other steps required.
 def findNumbers ( n , w ) :
	x = 0 ;
	sum = 0 ;
	if ( w >= 0 and w <= 8 ) :
		x = 9 - w ;
	elif ( w >= - 9 and w <= - 1 ) :
		x = 10 + w ;
	sum = pow ( 10 , n - 2 ) ;
	sum = ( x * sum ) ;
	return sum ;
n = 3 ;
w = 4 ;
print ( findNumbers ( n , w ) ) ;