Step 1: Compiler vs Interpreter
A compiler translates the entire source code into machine code at once, while an interpreter translates the source code line-by-line during execution.
Step 2: Explanation of Interpreter
An interpreter reads the source code one line at a time, executes it, and then moves to the next line. Examples of interpreted languages include Python and JavaScript.
Step 3: Why is it called an Interpreter?
Because it directly translates and executes code without generating a separate executable file, making it easier to debug.