python安裝和實現helloword
阿新 • • 發佈:2018-12-18
一、python下載
1、百度搜索python,進入官網:https://www.python.org/
2、在首頁點選python最新版
3、根據系統和位數選擇安裝包(我這裡是windows、64位)
4、下載
二、python安裝
1、雙擊exe檔案
2、勾選"Add Python 3.7 to PATH",點選選擇自定義安裝
3、勾選全部,點選next
4、勾選 Install for all users,選擇要安裝的位置,點選install,就開始安裝了
5、安裝中(耗時2分鐘)
6、安裝成功
三、驗證python是否安裝成功
開啟cmd,直接輸入python,回車,如果出現以下提示,說明python安裝成功
四、python實現第一個helloword程式
1、用python自帶工具IDLE
1、在開始選單,輸入python,點選IDLE(Python 3.7 64-bit)
2、輸入print(“hello world!”) 回車
2、用python自帶工具IDLE,同時新建檔案
這種方法可以將程式碼儲存下來
1、進入IDLE
2、新建檔案(點選File、點選New File )
3、寫入程式碼print(“hello world”)
4、儲存檔案
5、直接在當前檔案下按F5
按了之後,會在python Shell下打印出hello world