EOF Error on Input()

Whenever I am trying to use input(), it’s throwing EOF error -
File “source”, line 1, in
num=input()
EOFError: EOF when reading a line

The code is working fine on my system. Kindly help me out!

1 Like

Hello @saxena.shubhank.19,
Its due to the input stream being empty, if you are doing it in the online IDE, kindly ensure custom input is given.

Thanks :slight_smile:

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.

sir above mention solution is not working for me.
it works well in jupyter and pycharm but in coding block ide is showing EOF error even using custom input please help!