human
Write me a code to multiplication with a power of 2 and the other steps required given the following:
Multiplication with a power of 2 | Returns 2 raised to power n.
Driven program"
How can the above be solved in Python?
assistant
#Here is code to multiplication with a power of 2 and the other steps required.
 def power2 ( n ) :
	if ( n == 0 ) :
		return 1
	if ( n == 1 ) :
		return 2
	return power2 ( n / 2 ) *
		power2 ( n / 2 ) ;
def multiply ( x , n ) :
	return x * power2 ( n ) ;
x = 70
n = 2
print ( multiply ( x , n ) )