220-1102 · Question #260
Which of the following script types is used with the Python language by default?
The correct answer is D. .py. Python script files use the .py file extension by default. The .ps1 extension is used for PowerShell scripts, .vbs is for VBScript, and .bat is for Windows batch files. When the Python interpreter is installed, it associates itself with .py files so they can be executed directly.
Question
Which of the following script types is used with the Python language by default?
Options
- A.ps1
- B.vbs
- C.bat
- D.py
How the community answered
(37 responses)- A3% (1)
- B3% (1)
- C5% (2)
- D89% (33)
Explanation
Python script files use the .py file extension by default. The .ps1 extension is used for PowerShell scripts, .vbs is for VBScript, and .bat is for Windows batch files. When the Python interpreter is installed, it associates itself with .py files so they can be executed directly. This is a fundamental fact tested on CompTIA A+ and similar certifications to verify familiarity with scripting languages.
Topics
Community Discussion
No community discussion yet for this question.