human
Count ways to obtain given sum by repeated throws of a dice | Function to calculate the total number of ways to have sum N.
Initialize dp array.
Iterate over all the possible intermediate values to reach N.
Calculate the sum for all 6 faces.
Print total number of ways.
Driver Code.
Given sum N.
Function call"
Solution in Python:

=====
Write me a code to count ways to obtain given sum by repeated throws of a dice and the other steps required?
assistant
#Here is code to count ways to obtain given sum by repeated throws of a dice and the other steps required.
 def findWays ( N ) :
	dp = [ 0 ] * ( N + 1 ) ;
	dp [ 0 ] = 1 ;
	for i in range ( 1 , N + 1 ) :
		dp [ i ] = 0 ;
		for j in range ( 1 , 7 ) :
			if ( i - j >= 0 ) :
				dp [ i ] = dp [ i ] + dp [ i - j ] ;
	print ( dp [ N ] ) ;
if __name__ == ' _ _ main _ _ ' :
	N = 4 ;
	findWays ( N ) ;