human
Average of odd numbers till a given odd number | Function to calculate the average of odd numbers.
count odd numbers.
store the sum of odd numbers.
Driver function"
Solution in Python:
assistant
#Here is code to average of odd numbers till a given odd number and the other steps required.
 def averageOdd ( n ) :
	if ( n % 2 == 0 ) :
		print ( " Invalid ▁ Input " )
		return - 1
	sm = 0
	count = 0
	while ( n >= 1 ) :
		count = count + 1
		sm = sm + n
		n = n - 2
	return sm // count
n = 15
print ( averageOdd ( n ) )