Home python Error “unexpected EOF while parsing”

Error “unexpected EOF while parsing”

Author

Date

Category

this is the text of the program, the checker generates an error:

Y.Contest verdict: compilation-error

Traceback (most recent call last):
 File "/usr/lib/python3.6/py_compile.py", line 125, in compile
  _optimize = optimize)
 File "& lt; frozen importlib._bootstrap_external & gt;", line 741, in source_to_code
 File "& lt; frozen importlib._bootstrap & gt;", line 219, in _call_with_frames_removed
 File "/ temp / compiling / 737de4ed-fa1f-456e-8be8-c59aaf933295", line 13
  ^
SyntaxError: unexpected EOF while parsing
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
 File "/ temp / compiling / compilingScript", line 17, in & lt; module & gt;
  py_compile.compile (dst, doraise = True)
 File "/usr/lib/python3.6/py_compile.py", line 129, in compile
  raise py_exc
py_compile.PyCompileError: File "/ temp / compiling / 737de4ed-fa1f-456e-8be8-c59aaf933295", line 13
  ^
SyntaxError: unexpected EOF while parsing

Answer 1, authority 100%

SyntaxError: unexpected EOF while parsing

Unexpected end of file during parsing – EOF stands for End of File.

This means your code ended prematurely – the compiler was expecting something else , but your code ended before it happened .

The usual reason is that you started something and not finished – quote, apostrophe, parenthesis (round, square, curly): "'([{.

Basically it’s ) at the end of your program.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions