Visual Studio Code怎么运行Python?Visual Studio Code是非常好用的代码编辑软件,很多专业小伙伴都会使用该软件进行代码的编辑,同时我们编辑好代码之后,可以通过下述方法来运行,如果无
Visual Studio Code怎么运行Python?Visual Studio Code是非常好用的代码编辑软件,很多专业小伙伴都会使用该软件进行代码的编辑,同时我们编辑好代码之后,可以通过下述方法来运行,如果无法运行的话,那么检查一下是否安装了Python,没有安装的话,点击安装即可运行代码。
具体操作如下:
1、自由互联小编这里从新建文件开始演示一下全过程,首先用鼠标右键在桌面上点击一下,选择新建一个文件夹,并且给文件夹设置一下名称。

2、接着我们进入到Visual Studio Code的页面中,在该页面的左上角将【文件】选项进行点击打开,选择【打开文件夹】。

3、在打开的窗口中,将自己刚刚新建的文件夹找到,将该文件夹选中之后点击右下角的【选择文件夹】。

4、随后添加进来的文件夹会显示在页面左侧位置,我们将该文件夹后面的第一个图标进行点击,进行新建一个文件。

5、随后在下方会出现一个编辑框,在编辑框中输入一个文件的名称 ,而该名称的后缀名必须为【.py】。

6、接着就可以在右侧的页面中进行代码的编辑了,如图所示。

7、如果你发现无法运行该代码的话,那么我们点击左侧的箭头所指的图标,然后在打开的页面出现一个【Python】安装的提示,点击【安装】按钮即可安装。

8、随后我们将左侧的我们刚刚编辑的文件进行右键点击,选择【在终端中运行Python文件】,随后在右侧页面的底部就会进行我们编辑的代码运行状态,如图所示。
