human
Average of first n odd naturals numbers | Returns the Avg of first n odd numbers.
sum of first n odd number.
Average of first n odd numbers.
Driver Code"
How can the above be solved in Python?
 Give me a code to average of first n odd naturals numbers and the other steps required?
assistant
#Here is code to average of first n odd naturals numbers and the other steps required.
 def avg_of_odd_num ( n ) :
	sm = 0
	for i in range ( 0 , n ) :
		sm = sm + ( 2 * i + 1 )
	return sm // n
n = 20
print ( avg_of_odd_num ( n ) )