What is the correct sequence for Python script execution?
A.
The code is translated to byte code, the byte code is executed in runtime, and then the code is interpreted.
B.
The code is interpreted, the code is translated to byte code, and then the byte code is executed in runtime.
C.
The code is translated to byte code, the code is interpreted, and then the byte code is executed in runtime.
D.
The byte code is executed in runtime, the code is interpreted, and then the code is translated to byte code.
The Answer Is:
B
This question includes an explanation.
Explanation:
Python follows a specific execution flow when a script is run:
The code is interpreted:Python is an interpreted language, meaning that the Python interpreter reads the code line by line. When a Python script is executed, the interpreter first reads the source code.
The code is translated to bytecode:After interpreting the source code, Python translates it intobytecode. Bytecode is an intermediate representation of the source code that is portable and efficient for execution by the Python Virtual Machine (PVM).
The bytecode is executed in runtime:Finally, thePython Virtual Machine (PVM)executes the bytecode. The PVM is a part of the Python runtime environment, responsible for interpreting the bytecode into machine-specific instructions for execution.
Hence, the correct sequence is:interpreted → translated to bytecode → bytecode executed in runtime.
Why the Other Options Are Incorrect:
Options A, C, and D present an incorrect order of the script execution process, especially in how bytecode is generated and executed.
References:
Python’s documentation on the interpreter and its execution model explains this standard process.
JN0-223 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 60% Discount on All Products,
Use Coupon: "8w52ceb345"