Operational Procedures

Which statements about .py script files are true? (Choose three.)

Choose 3 answers

Show the answer

Correct answersA. They can automate general administrative tasks.C. They contain Python code that a Python interpreter runs.D. They can run on Windows, Linux and macOS when an interpreter is installed.

AWhy this is right: Python is a general-purpose language widely used to automate admin tasks.

BWhy not this: Windows Script Host is for VBScript and JScript, and Python needs its own interpreter.

CWhy this is right: Python source is executed by an interpreter, which reads the .py file.

DWhy this is right: Python interpreters exist for all three systems, so the same script can run on each.

EWhy not this: Python source runs directly in the interpreter; packaging a script as an .exe is optional.

A .py file is Python source that needs a Python interpreter, which exists for Windows, Linux and macOS, and Python is a general-purpose language suited to automation. Windows Script Host runs .vbs and .js files, not Python. They run directly in the interpreter without being compiled to an .exe.