What sequence of steps is required to execute a Python script from a text editor using the terminal on a Windows device?
To run a Python script from a text editor using the terminal on Windows, the file should first be saved with the .py extension. Then, the terminal is opened, and the script is executed using the Python command followed by the filename.
Example:
python filename.py
The official Python documentation explains that when the interpreter is called with a filename argument, it reads and executes the script from that file. On Windows, the python command can be used from a terminal after Python is installed and configured correctly.
Therefore, the correct answer is A. Save file > open terminal > type python filename.py.
Currently there are no comments in this discussion, be the first to comment!