human
Convert X into Y by repeatedly multiplying X with 2 or appending 1 at the end | Function to check if X can be converted to Y by multiplying X by 2 or appending 1 at the end.
Iterate until Y is at least X.
If Y is even.
If the last digit of Y is 1.
Otherwise.
Check if X is equal to Y.
Driver Code"
Solution in Python:

Write me a code to convert X into Y by repeatedly multiplying X with 2 or appending 1 at the end and the other steps required?
assistant
#Here is code to convert X into Y by repeatedly multiplying X with 2 or appending 1 at the end and the other steps required.
 def convertXintoY ( X , Y ) :
	while ( Y > X ) :
		if ( Y % 2 == 0 ) :
			Y //= 2
		elif ( Y % 10 == 1 ) :
			Y //= 10
		else :
			break
	if ( X == Y ) :
		print ( " Yes " )
	else :
		print ( " No " )
if __name__ == ' _ _ main _ _ ' :
	X , Y = 100 , 40021
	convertXintoY ( X , Y )