human
What is a code to check if a number can be represented as sum of two consecutive perfect cubes and the other steps required given the following:
Check if a number can be represented as sum of two consecutive perfect cubes | Function to check if a number can be expressed as the sum of cubes of two consecutive numbers.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to check if a number can be represented as sum of two consecutive perfect cubes and the other steps required.
 def isCubeSum ( n ) :
	for i in range ( 1 , int ( pow ( n , 1 / 3 ) ) + 1 ) :
		if ( i * i * i + ( i + 1 ) * ( i + 1 ) * ( i + 1 ) == n ) :
			return True ;
	return False ;
if __name__ == ' _ _ main _ _ ' :
	n = 35 ;
	if ( isCubeSum ( n ) ) :
		print ( " Yes " ) ;
	else :
		print ( " No " ) ;