16.2 Translation Software (3)

Resources | Revision Questions | Computer Science

Login to see all questions

Click on a question to view the answer

1.

Consider a simple program written in a language like Python: ```python x = 5 y = x + 2 print(y) ``` Describe, step-by-step, how an interpreter would execute this program. Include details of the roles of the different phases of interpretation.

2.

Explain how an interpreter executes a program directly from the source code, without first creating a separate, translated executable file. Your answer should detail the key steps involved in the interpretation process.

3.

Explain the difference between a compiler and an interpreter. Discuss the advantages and disadvantages of each approach, providing examples of languages that typically use each.