Eof error generated

def gen (a,left,right,n):
if(len(a)==2*n):
print(a)
return
if(left<n):
gen(a+"(",left+1,right,n)
if(left>right):
gen(a+")",left,right+1,n)

n=int(input())
gen("(",1,0,n)

hey @ajaysiddartha,
This error occurs when we don’t provide proper input to our code.
So kindly check that you are providing a custom input while doing compile and test.

Thank You and Happy Learning :slightly_smiling_face:.

ok thank u bro for putting in time …

hey @ajaysiddartha ,
I request you to kindly mark this doubt as resolved in your discussion forum and also provide your valuable feedback as it would helps us to improve this platform and provide you with better learning experience.

Thank You and Happy learning :slightly_smiling_face:.

yes i have pasted it

Okay Thank You :slightly_smiling_face:.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.