Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

WGU Foundations of Programming Python Exam - Topic 2 Question 8 Discussion

Actual exam question for WGU's Foundations of Programming Python exam
Question #: 8
Topic #: 2
[All Foundations of Programming Python Questions]

What sequence of steps is required to execute a Python script from a text editor using the terminal on a Windows device?

Show Suggested Answer Hide Answer
Suggested Answer: A

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.


Contribute your Thoughts:

0/2000 characters

Currently there are no comments in this discussion, be the first to comment!


Save Cancel