human
Heptagonal number | Function to find nth Heptagonal number.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to heptagonal number and the other steps required.
 def heptagonalNumber ( n ) :
	return ( ( 5 * n * n ) - ( 3 * n ) ) // 2
if __name__ == ' _ _ main _ _ ' :
	n = 2
	print ( heptagonalNumber ( n ) )
	n = 15
	print ( heptagonalNumber ( n ) )