馃敻

Syntax and Operators

馃挕
Syntax: the set of grammatical rules to be followed in a programming language.

Examples:

  • English: An apostrophe can replace letters e.g. Don't instead of do not
  • Spanish: Questions have upside down question marks at the start of them e.g. D贸nde est谩 la biblioteca?
  • Python: Strings must be contained within speech marks e.g. "Hello"
image

Syntax is particularly important in programming as the compiler will execute the programming code according to the pre-set language syntax rules.

If the programmer types something that is "against the rules", a syntax error will occur and the compiler will be unable to execute the code.

image
馃挕
Operators: symbols that perform a specific function.

Arithmetic Operators

Boolean Operators