human
Expressing a number as sum of consecutive | Set 2 ( Using odd factors ) | returns the number of odd factors.
If i is an odd factor and n is a perfect square.
If n is not perfect square.
N as sum of consecutive numbers"
Solution in Python:

Can you provide a code to expressing a number as sum of consecutive and the other steps required?
assistant
#Here is code to expressing a number as sum of consecutive and the other steps required.
 def countOddFactors ( n ) :
	odd_factors = 0
	i = 1
	while ( ( 1 * i * i ) <= n ) :
		if ( n % i == 0 ) :
			if ( 1 * i * i == n ) :
				if ( i & 1 ) :
					odd_factors = odd_factors + 1
			else :
				if ( ( i & 1 ) ) :
					odd_factors = odd_factors + 1
				factor = int ( n / i )
				if ( factor & 1 ) :
					odd_factors = odd_factors + 1
		i = i + 1
	return odd_factors - 1
N = 15
print ( countOddFactors ( N ) )
N = 10
print ( countOddFactors ( N ) )