Compilation issue for problem Generate Parentheses

I wrote the following code in python, and it showed error while compiling:
def parentheses(oBrac,cBrac):
if cBrac==n:
print("".join§)
return
if oBrac<n:
p.append(’(’)
parentheses(oBrac+1,cBrac)
p.pop()
if oBrac>cBrac:
p.append(’)’)
parentheses(oBrac,cBrac+1)
p.pop()
return

n=int(input())
p=[]
parentheses(0,0)

The code is working fine for custom inputs. The error is:
Traceback (most recent call last):
File “source”, line 15, in
n=int(input())
EOFError: EOF when reading a line

Hey @SanchitSayala, actually whenever you run your code on online ide, you need to provide custom input first and than click on run button. Click on input button provide the custom input and than press run.

Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts section. :blush:

Then how do I submit my code?? Because it does not pass any test case.

I think I there is some problem in the line: n=int(input( )). I tried some other problems and the same error persists in the aforementioned line.

Hey @SanchitSayala, test your code on, cb.lk/ide . Remember to run your code after providing the input only.

It shows there’s some error while running the code, please try again.

Hey @SanchitSayala , refer to this video,

Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts section. :blush:

I copied the exact same code as shown in the video. The error still persists. As i have mentioned earlier, there seems to be some problem with the line, n=int(input()). It shows Error: EOF when reading a line.

Its resolved, thanks.