# Interpreter

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

**Field:** Software Development  
**Category:** Compilers & Runtimes

## Think of it like

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

## 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

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

## Example code

```console
$ python3
>>> print(2 + 3)
5
```

Each line runs the moment you press Enter.

## Why it matters

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

## Common mistake

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

## Three principles

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

## Related terms

- [Compiler](https://learn.benibix.com/term/development/compiler)
- [Bytecode](https://learn.benibix.com/term/development/bytecode)
- [Interpreted Language](https://learn.benibix.com/term/development/interpreted-language)
- [Python](https://learn.benibix.com/term/development/python)
- [Read-Eval-Print Loop (REPL)](https://learn.benibix.com/term/development/repl)
- [Runtime Environment](https://learn.benibix.com/term/development/runtime-environment)

## Taught in

- [Compilers and Interpreters](https://learn.benibix.com/learn/development-languages/compilers-and-interpreters): Programming Languages, 2/12

---

Source: https://learn.benibix.com/term/development/interpreter
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
