Syntax Errors
Computer Science: KS3, topic 2.1.19
Syntax Errors
Syntax errors are some of the easier bugs to fix in a broken program.

Syntax errors
- A syntax error is a mistake in the way the code is written.
- A syntax error is similar to a spelling or grammar mistake in English.
- Syntax errors prevent programs from running.
- A translator needs code to be syntactically correct.

Example of an error
- prnt("Hello, world!");
- Incorrect subroutine identifier.
- newbalance = newBalance * 1.05;
- Wrong capitalisation in variable identifier.
- myBoolean = True NOT False;
- NOT does not take two operands.
Test yourself on Syntax Errors
Why do syntax errors prevent programs from running?
Which of the following are syntax errors?
Would the following code cause a syntax error?
print("Hello, world!")Look at this code: Score = score + 10. Which type of syntax error does this show?