human
Give me a code to number of steps required to reach point ( x , y ) from ( 0 , 0 ) using zig and the other steps required given the following:
Number of steps required to reach point ( x , y ) from ( 0 , 0 ) using zig | Function to return the required position.
Driver Code"
Solution in Python:
assistant
#Here is code to number of steps required to reach point ( x , y ) from ( 0 , 0 ) using zig and the other steps required.
 def countSteps ( x , y ) :
	if x < y :
		return x + y + 2 * ( ( y - x ) // 2 )
	else :
		return x + y + 2 * ( ( ( x - y ) + 1 ) // 2 )
if __name__ == " _ _ main _ _ " :
	x , y = 4 , 3
	print ( countSteps ( x , y ) )