nerdexam
Python_Institute

PCEP-30-02 · Question #137

The compiled Python bytecode is stored in les having names ending with:

The correct answer is C. pyc. Python compiles source code into bytecode and stores it in files with the .pyc extension (option C) - the "c" stands for "compiled." These files are typically placed in a __pycache__ directory and allow Python to skip re-parsing unchanged source files on subsequent runs. A…

Question

The compiled Python bytecode is stored in les having names ending with:

Options

  • Apy
  • Bpyb
  • Cpyc
  • Dpc

How the community answered

(26 responses)
  • A
    4% (1)
  • B
    15% (4)
  • C
    77% (20)
  • D
    4% (1)

Explanation

Python compiles source code into bytecode and stores it in files with the .pyc extension (option C) - the "c" stands for "compiled." These files are typically placed in a __pycache__ directory and allow Python to skip re-parsing unchanged source files on subsequent runs.

  • A (.py) - that's the source code file itself, not the compiled output.
  • B (.pyb) - not a real Python file extension; a plausible-looking distractor.
  • D (.pc) - also not a valid Python extension; another invented option.

Memory tip: Think .py + c for compiled → .pyc. The pattern mirrors other languages: Java uses .class, C uses .o - Python uses .pyc.

Community Discussion

No community discussion yet for this question.

Full PCEP-30-02 Practice