human
Print the balanced bracket expression using given brackets | Function to print balanced bracket expression if it is possible.
If the condition is met.
Print brackets of type - 1.
Print brackets of type - 3.
Print brackets of type - 4.
Print brackets of type - 2.
If the condition is not met.
Driver code"
How can the above be solved in Python?
 Write me a code to print the balanced bracket expression using given brackets and the other steps required?
assistant
#Here is code to print the balanced bracket expression using given brackets and the other steps required.
 def printBalancedExpression ( a , b , c , d ) :
	if ( ( a == d and a ) or ( a == 0 and c == 0 and d == 0 ) ) :
		for i in range ( 1 , a + 1 ) :
			print ( " ( ( " , end = " " )
		for i in range ( 1 , c + 1 ) :
			print ( " ) ( " , end = " " )
		for i in range ( 1 , d + 1 ) :
			print ( " ) ) " , end = " " )
		for i in range ( 1 , b + 1 ) :
			print ( " ( ) " , end = " " )
	else :
		print ( " - 1" )
if __name__ == " _ _ main _ _ " :
	a , b , c , d = 3 , 1 , 4 , 3
	printBalancedExpression ( a , b , c , d )