human
Give me a code to find the sum of the first N Centered Decagonal Numbers and the other steps required given the following:
Find the sum of the first N Centered Decagonal Numbers | Function to find the N - th centred decagonal number.
Formula to calculate nth Centered_decagonal number & return it into main function ..
Function to find the sum of the first N Centered decagonal numbers.
Variable to store the sum.
Iterating through the range.
Driver code.
display first Nth Centered_decagonal number"
How can the above be solved in Python?
assistant
#Here is code to find the sum of the first N Centered Decagonal Numbers and the other steps required.
 def Centered_decagonal_num ( n ) :
	return ( 5 * n * n - 5 * n + 1 )
def sum_Centered_decagonal_num ( n ) :
	summ = 0
	for i in range ( 1 , n + 1 ) :
		summ += Centered_decagonal_num ( i )
	return summ
if __name__ == ' _ _ main _ _ ' :
	n = 5
	print ( sum_Centered_decagonal_num ( n ) )