IEEE發布2017年編程語言排行榜:Python高居首位。眾所周知,自動去年alpha go在圍棋界大放異彩后,人工智能成為全社會的熱點話題。而Python作為全球最活躍的人工智能開源庫tensorflow開源庫的主要語言之一,自然也成為科研界,工業界追捧的對象。
安裝Python
方法一:從Python官網下載Python 3.5的安裝程序(網速慢的同學請移步國內鏡像),雙擊運行并安裝;
方法二:如果安裝了Homebrew,直接通過命令brew install python3
安裝即可。
檢測Python 是否安裝成功?
檢測Python是否安裝成功
配置VScode 環境
創建Python 文件
創建test.py 文件
print("Hello VSCode")
a = 1
b = 2
c = a + b
print(c)
創建task.json 文件
使用快捷鍵command + shift + b, 創建task.json。
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "python",
"isShellCommand": true,
"args": ["test.py"],
"showOutput": "always"
}
執行python 文件
通過command + shift + b,自動化執行python 文件,并在output 欄查看輸出結果。
查看輸出結果