SyntaxError
Python raises a syntax error when it encounters source code that cannot be be parsed following the rules of the Python grammar.
Note that the text of the error message depends on the implementation. Different versions of Python and different checking tools will give slightly different messages.
print(2 x)SyntaxError: invalid syntax. Perhaps you forgot a comma?
print(x + 1) * 2)SyntaxError: unmatched ')'
print("Hello World!)SyntaxError: unterminated string literal
from pytamaro import rectangle,SyntaxError: trailing comma not allowed without surrounding parentheses

PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI
Privacy Policy • Platform Version a9143b0 (Sun, 14 Dec 2025 12:09:46 GMT)