🧩Syntax
The rules for how code must be typed. One wrong sign and it will not run.
Think of it like
Think of it like the rules for writing a date. Day, month and year must go in the right spots.
Example
Jack types print("Hi" and forgets the last bracket. Python stops before running a single line.
Why it matters
Code that breaks the syntax rules never runs. Learning them is the first step in any new language.
Definition
Example code
python
>>> print("Hi"
File "<stdin>", line 1
print("Hi"
^
SyntaxError: '(' was never closedCommon mistake
Key takeaways
- 1Strict rules. One wrong sign can stop the whole program.
- 2Per language. Each language spells things its own way.
- 3Form, not meaning. Good syntax does not mean the logic is right.