human
Position of rightmost set bit | Program to find position of rightmost set bit.
Iterate till number > 0.
Checking if last bit is set.
Increment position and right shift number.
set bit not found ..
Driver Code.
Function call"
Solution in Python:

=====
Can you provide a code to position of rightmost set bit and the other steps required?
assistant
#Here is code to position of rightmost set bit and the other steps required.
 def PositionRightmostSetbit ( n ) :
	p = 1
	while ( n > 0 ) :
		if ( n & 1 ) :
		return p
		p += 1
		n = n >> 1
	return - 1 ;
n = 18
pos = PositionRightmostSetbit ( n )
if ( pos != - 1 ) :
	print ( pos )
else :
	print ( 0 )