nerdexam
Python_Institute

PCEP-30-02 · Question #130

What do you call a computer program which directly executes instructions written in a programming language?

The correct answer is B. An interpreter. An interpreter directly executes instructions line-by-line in real time, without converting the entire program to machine code first - making it the right fit here. A compiler (A) is wrong because it translates the entire source code into machine code before execution, not…

Question

What do you call a computer program which directly executes instructions written in a programming language?

Options

  • AA compiler
  • BAn interpreter
  • CA translator

How the community answered

(33 responses)
  • A
    6% (2)
  • B
    82% (27)
  • C
    12% (4)

Explanation

An interpreter directly executes instructions line-by-line in real time, without converting the entire program to machine code first - making it the right fit here. A compiler (A) is wrong because it translates the entire source code into machine code before execution, not during it. A translator (C) is a broad umbrella term for any tool that converts code from one form to another (including compilers), so it's too vague and not the specific term for direct execution.

Memory tip: Think of an interpreter like a human interpreter at a speech - they translate and deliver each sentence as it's spoken, one at a time. A compiler is more like translating an entire book before anyone reads it.

Community Discussion

No community discussion yet for this question.

Full PCEP-30-02 Practice