2025年5月22日 星期四

認識Python

markdown

Written by Neo

### 下載Python 3 1. macOS版/windows版 搜尋python 3並下載最新版 [Python官網](https://www.python.org/downloads/) 2. iPhone/ipad 在apple store上搜尋pythonista 要$320!! ### 認識終端機 CLI 1. MacOS: 按command+N或是 應用程式>工具程式>終端機 來開啟終端機 輸入python3 以開啟python的互動式直譯器(REPL模式) 2. 輸入exit離開python3 3. 開啟Python後 輸入print (‘hello world’)然後按enter可以讓他輸出 hello world的文字
>>>print (‘hello world’)
hello world   #電腦的回答
print ('輸入文字') 1 print 列印 2 ()函式 3 ' ' 文字 Print會將後面括弧中的內容輸出 而點代表了輸出的是文字 而不是其他

沒有留言:

張貼留言

熱門文章