human
Repeated sum of first N natural numbers | Function to return the sum of the first n natural numbers.
Function to return the repeated sum.
Perform the operation exactly k times.
Update n with the sum of first n natural numbers.
Driver code"
How can the above be solved in Python?

Give me a code to repeated sum of first N natural numbers and the other steps required?
assistant
#Here is code to repeated sum of first N natural numbers and the other steps required.
 def sum ( n ) :
	sum = ( n * ( n + 1 ) ) // 2
	return sum
def repeatedSum ( n , k ) :
	for i in range ( k ) :
		n = sum ( n )
	return n
n = 2
k = 2
print ( repeatedSum ( n , k ) )