human
Program to find whether a given number is power of 2 | Function to check if x is power of 2.
Driver code"
Solution in Python:

=====
Write me a code to program to find whether a given number is power of 2 and the other steps required?
assistant
#Here is code to program to find whether a given number is power of 2 and the other steps required.
 def isPowerofTwo ( n ) :
	if ( n == 0 ) :
		return 0
	if ( ( n & ( ~ ( n - 1 ) ) ) == n ) :
		return 1
	return 0
if ( isPowerofTwo ( 30 ) ) :
	print ( ' Yes ' )
else :
	print ( ' No ' )
if ( isPowerofTwo ( 128 ) ) :
	print ( ' Yes ' )
else :
	print ( ' No ' )