human
What is a code to sum of all elements up to Nth row in a Pascal triangle and the other steps required given the following:
Sum of all elements up to Nth row in a Pascal triangle | Function to find sum of all elements upto nth row ..
Initialize sum with 0.
Calculate 2 ^ n.
Driver unicode"
How can the above be solved in Python?
assistant
#Here is code to sum of all elements up to Nth row in a Pascal triangle and the other steps required.
 def calculateSum ( n ) :
	sum = 0
	sum = 1 << n ;
	return ( sum - 1 )
n = 10
print ( " Sum ▁ of ▁ all ▁ elements : " , calculateSum ( n ) )