7.2 Errors

Nov 10, 2019

Syntax errors

The errors that occur when translators are translating the program into machine code. These errors are always caused by stupid like spelling mistake, missing punctuation.


The executable file will not be produced, and you will get a message that shows you why and where the error is.


Because interpreter translate the program line by line, every line would occur until the interpreter meet a syntax mistake. It will stop immediately and throw out the error message.

The Difference is Complier doesn’t run the program but the Interpreter run all lines before the error line.

Logic errors

Logic errors mean that the program doesn’t what it is expected. For example, stuck in a while loop or print unexpected messages.

Run-time errors

The errors that when the machine code is running. A good example for this is divide by zero in operation.

Past Paper Question


Please notice that the mark scheme’s format are WRONG IN YOUR EOS EXAM

Mark Scheme

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.