human
What is a code to append two elements to make the array satisfy the given condition and the other steps required given the following:
Append two elements to make the array satisfy the given condition | Function to find the required numbers.
Find the sum and xor.
Print the required elements.
Driver code"
Solution in Python:
assistant
#Here is code to append two elements to make the array satisfy the given condition and the other steps required.
 def findNums ( arr , n ) :
	S = 0 ; X = 0 ;
	for i in range ( n ) :
		S += arr [ i ] ;
		X ^= arr [ i ] ;
	print ( X , X + S ) ;
if __name__ == " _ _ main _ _ " :
	arr = [ 1 , 7 ] ;
	n = len ( arr ) ;
	findNums ( arr , n ) ;