human
Smallest power of 2 greater than or equal to n | .
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to smallest power of 2 greater than or equal to n and the other steps required.
 def nextPowerOf2 ( n ) :
	p = 1
	if ( n and not ( n & ( n - 1 ) ) ) :
		return n
	while ( p < n ) :
		p <<= 1
	return p ;
n = 5
print ( nextPowerOf2 ( n ) ) ;