nerdexam
Python_Institute

PCEP-30-02 · Question #152

Which one of the following is an example of a Python le extension?

The correct answer is B. py. Python source files use the .py extension (option B), which is the universally recognized suffix for Python scripts and modules - for example, script.py or app.py. Option A (.pl) is the file extension for Perl, a different scripting language, making it a common trap for those…

Question

Which one of the following is an example of a Python le extension?

Options

  • Apl
  • Bpy
  • Cp

How the community answered

(30 responses)
  • A
    7% (2)
  • B
    73% (22)
  • C
    20% (6)

Explanation

Python source files use the .py extension (option B), which is the universally recognized suffix for Python scripts and modules - for example, script.py or app.py.

Option A (.pl) is the file extension for Perl, a different scripting language, making it a common trap for those who know multiple languages. Option C (.p) is not a standard extension for any major language in common use and is simply a distractor.

Memory tip: Think "python = .py" - the extension is just the first two letters of the language name, making it one of the most intuitive file extensions to remember.

Community Discussion

No community discussion yet for this question.

Full PCEP-30-02 Practice