What is an interpreted language?



The lesson description calls Python an “interpreted” language. What does that mean?


An interpreter takes the code you write an executes (runs) whatever actions you specified, creates the variables you created, and does a lot of behind-the-scenes work to ensure it runs smoothly or tells you about errors.

Python is called an interpreted language because it goes through an interpreter, which turns code you write into the language understood by your computer’s processor. Later on when you work on a project on your own computer, you will download and use the Python interpreter to be able to write Python code and execute it on your own!

FAQ: Learn Python - Python Syntax - Strings

An interpreter is basically very different from a compiler.
The interpreter is used mostly for scripting languages like python etc, which directly executes the code (no separate stages for compiling the code and then executing it) by converting it into an intermediate code usually called the byte code. This definitely increases the speed of execution.
This byte code is platform independent which can later be run on different platforms so the code is portable.


Except platform independent like Java, the compiled code is more efficient
with optimization even recently Java made a lot of improvement for performance.
Besides, in real-time operations, the interpreted language is normally not fast enough
to handle interrupts or real-time response in the sub-micron seconds.
In terms of sizing, the compiled language can take advantage of machine/hardware
architecture to use directly assembly codes for specific operations like copy, move
just as under x86 or ARM.


Python is an “interpreted” language.

This means it uses an interpreter. An interpreter is very different from the compiler.

An interpreter executes the statements of code “one-by-one” whereas the compiler executes the code entirely and lists all possible errors at a time.

That’s why python shows only one error message even though your code has multiple errors. This will help you to clear errors easily and it definitely will increase the execution speed.