
Python 開發工具
利用 Visual Studio Code 寫 Python 程式
Visual Studio Code 原生支援 Python 的語法高亮度,當用 Visual Studio Code 開啟 Python 檔案的時候,就會主動跳出該語言相關的 extension ,並建議安裝,各種 extension 功能不一,主要是讓寫程式可以更有效率。
下圖為在 MS-Windows 中利用 Visual Studio Code 打開 hello.py

如果要在 Visual Studio Code 去執行 Python 程式檔案,那就要安裝相關的 extension ,安裝 extension 請點擊下圖紅色箭頭所指的按鈕

然後會出現各種 extension ,這裡我們安裝可執行多種程式語言程式的 Code Runner ,此時在搜尋欄位打 Code Runner ,底下第一個就是我們需要的,點擊右下角綠色的 Install 按鈕就會自動安裝

安裝完需要再點擊藍色的 Reload 按鈕

這時候視窗右上角出現了執行鍵

點擊執行鍵,就會自動呼叫 Python 指令執行 Python 程式囉!

