Skip to content
BENIBIX Learn

Interpreter

Development⚙️ Compilers & RuntimesCompilation

A program that reads your code and runs it straight away, line by line.

Think of it like

Think of it like reading a recipe out loud. Each step is done as soon as it is read.

Example

Emma types print(2 + 3) into Python and presses Enter. The interpreter runs it at once and prints 5.

Why it matters

You see results at once, which makes learning and testing ideas fast.

Definition

An interpreter reads source code and runs it straight away, line by line. There is no separate file to build first. You change the code and run it again at once. The interpreter has to be on the machine every time the program runs. Python and Ruby are usually run this way.

Example code

console
$ python3
>>> print(2 + 3)
5
Each line runs the moment you press Enter.

Common mistake

Expecting an error on line 50 to show before line 1 runs. The interpreter only finds it when it gets there.

Key takeaways

  1. 1
    Runs at once. No build step before running.
  2. 2
    Line by line. It reads and runs as it goes.
  3. 3
    Must be present. The interpreter is needed every run.

Learn it properly