human
Average of even numbers till a given even number | Function to calculate the average of even numbers.
count even numbers.
store the sum of even numbers.
driver function"
How can the above be solved in Python?

=====
Give me a code to average of even numbers till a given even number and the other steps required?
assistant
#Here is code to average of even numbers till a given even number and the other steps required.
 def averageEven ( n ) :
	if ( n % 2 != 0 ) :
		print ( " Invalid ▁ Input " )
		return - 1
	sm = 0
	count = 0
	while ( n >= 2 ) :
		count = count + 1
		sm = sm + n
		n = n - 2
	return sm // count
n = 16
print ( averageEven ( n ) )