human
Write me a code to gould 's Sequence and the other steps required given the following:
Gould 's Sequence | Function to generate gould 's Sequence.
loop to generate each row of pascal 's Triangle up to nth row.
Loop to generate each element of ith row.
if c is odd increment count.
print count of odd elements.
Get n.
Function call"
Solution in Python:
assistant
#Here is code to gould 's Sequence and the other steps required.
 def gouldSequence ( n ) :
	for row_num in range ( 1 , n ) :
		count = 1
		c = 1
		for i in range ( 1 , row_num ) :
			c = c * ( row_num - i ) / i
			if ( c % 2 == 1 ) :
				count += 1
		print ( count , end = " ▁ " )
n = 16 ;
gouldSequence ( n )