human
Write a program to calculate pow ( x , n ) | Function to calculate x raised to the power y.
Driver Code"
Solution in Python:
 Give me a code to write a program to calculate pow ( x , n ) and the other steps required?
assistant
#Here is code to write a program to calculate pow ( x , n ) and the other steps required.
 def power ( x , y ) :
	if ( y == 0 ) : return 1
	elif ( int ( y % 2 ) == 0 ) :
		return ( power ( x , int ( y / 2 ) ) * power ( x , int ( y / 2 ) ) )
	else :
		return ( x * power ( x , int ( y / 2 ) ) * power ( x , int ( y / 2 ) ) )
x = 2 ; y = 3
print ( power ( x , y ) )