Bird
0
0

When you run a Python script, what is the first action performed by the Python runtime environment?

easy📝 Conceptual Q1 of 15
Python - Basics and Execution Environment
When you run a Python script, what is the first action performed by the Python runtime environment?
AIt directly executes the source code line by line
BIt compiles the source code into bytecode
CIt converts the code into machine language
DIt optimizes the code for faster execution
Step-by-Step Solution
Solution:
  1. Step 1: Compilation to Bytecode

    Python first compiles the source code into bytecode, which is a lower-level, platform-independent representation.
  2. Step 2: Bytecode Execution

    The Python Virtual Machine (PVM) then executes this bytecode.
  3. Final Answer:

    It compiles the source code into bytecode -> Option B
  4. Quick Check:

    Python does not execute source code directly but compiles it first. [OK]
Quick Trick: Python compiles code to bytecode before execution [OK]
Common Mistakes:
MISTAKES
  • Thinking Python runs source code directly without compilation
  • Assuming Python converts code directly to machine language
  • Believing Python optimizes code before running

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Python Quizzes