human
Check if bits of a number has count of consecutive set bits in increasing order | Returns true if n has increasing count of continuous - 1 else false.
store the bit - pattern of n into bit bitset - bp.
set prev_count = 0 and curr_count = 0..
increment current count of continuous - 1.
traverse all continuous - 0.
check prev_count and curr_count on encounter of first zero after continuous - 1 s.
check for last sequence of continuous - 1.
Driver code"
How can the above be solved in Python?

Give me a code to check if bits of a number has count of consecutive set bits in increasing order and the other steps required?
assistant
#Here is code to check if bits of a number has count of consecutive set bits in increasing order and the other steps required.
 def findContinuous1 ( n ) :
	bp = list ( bin ( n ) )
	bits = len ( bp )
	prev_count = 0
	curr_count = 0
	i = 0
	while ( i < bits ) :
		if ( bp [ i ] == '1' ) :
			curr_count += 1
			i += 1
		elif ( bp [ i - 1 ] == '0' ) :
			i += 1
			curr_count = 0
			continue
		else :
			if ( curr_count < prev_count ) :
				return 0
			i += 1
			prev_count = curr_count
			curr_count = 0
	if ( prev_count > curr_count and ( curr_count != 0 ) ) :
		return 0
	return 1
n = 179
if ( findContinuous1 ( n ) ) :
	print ( " Yes " )
else :
	print ( " No " )