human
Write me a code to average of Cubes of first N natural numbers and the other steps required given the following:
Average of Cubes of first N natural numbers | Function to find average of cubes.
Storing sum of cubes of numbers in sum.
Calculate sum of cubes.
Return average.
Driver Code.
Given Number.
Function Call"
How can the above be solved in Python?
assistant
#Here is code to average of Cubes of first N natural numbers and the other steps required.
 def findAverageOfCube ( n ) :
	sum = 0
	for i in range ( 1 , n + 1 ) :
		sum += i * i * i
	return round ( sum / n , 6 )
if __name__ == ' _ _ main _ _ ' :
	n = 3
	print ( findAverageOfCube ( n ) )