human
Two Balls Reachability Game | Recursive function to return gcd of a and b.
Function returns if it 's possible to have X white and Y black balls or not..
Finding gcd of ( x , y ) and ( a , b ).
If gcd is same , it 's always  possible to reach (x, y).
Here it 's never possible  if gcd is not same.
Driver Code"
How can the above be solved in Python?

What is a code to two Balls Reachability Game and the other steps required?
assistant
#Here is code to two Balls Reachability Game and the other steps required.
 def gcd ( a , b ) :
	if ( b == 0 ) :
		return a ;
	return gcd ( b , a % b ) ;
def IsPossible ( a , b , x , y ) :
	final = gcd ( x , y ) ;
	initial = gcd ( a , b ) ;
	if ( initial == final ) :
		print ( " POSSIBLE " ) ;
	else :
		print ( " NOT ▁ POSSIBLE " ) ;
if __name__ == " _ _ main _ _ " :
	A = 1 ; B = 2 ; X = 4 ; Y = 11 ;
	IsPossible ( A , B , X , Y ) ;
	A = 2 ; B = 2 ; X = 3 ; Y = 6 ;
	IsPossible ( A , B , X , Y ) ;