Instruction (80%)

2. 開始跟著課程寫程式

2.1 開啟jupyter notebook

  1. 下載課程內容: Download materials from https://github.com/P4CSS/PSS107 unzip and remember the location of it on your computer

  2. 開啟jupyter notebook: 開啟cmd.exe (wins) 或terminal.app (osx),並輸入jupyter notebook 以啟動他。也可以打開Anaconda Navigator,然後選擇Jupyter notebook執行它。

  3. 啟動後命令視窗(cmd.exe或terminal.app)會出現一段有token的網址,請記得有這回事,當不小心關掉所有視窗後,只要用這段網址貼在網址列就可以重新打開jupyter notebook。

open cmd.exe (wins) or terminal.app (osx), type jupyter notebook to start it
Open Anaconda-Navigator then Start the jupyter notebook
Copy/paste the URL into your browser to open the jupyter notebook

2.2 快速鍵jupyter notebook

  • Shift + Enter run the current cell, select below

  • Ctrl + Enter run selected cells

  • Alt + Enter run the current cell, insert below

  • Ctrl + S save and checkpoint

  • Enter take you into edit mode

  • D, D (press the key twice) delete selected cells

  • Esc take you into command mode

  • Y change the cell type to Code

  • M change the cell type to Markdown

  • A insert cell above

  • B insert cell below

2.3 jupyter lab

建議jupyter notebook的使用者可直接改用jupyter lab,用法和jupyter notebook一樣,又可以讓存取檔案、操作資料變的更方便。打開Anaconda-Navigator就可以找到JupyterLab

或者直接在Command Line輸入jupyter lab就可以啟動。

啟動後的結果如下圖,編輯起來跟jupyter notebook一樣。

3. 課程學習指引

由於我建立這個gitbook的目的是授課,我提供以下學習材料,是我課堂中必要或者延伸教材。

主要學習教材:Youtube

Youtube的內容主要是沿著這個gitbook pyTutorial來講解,大部分的code都會和gitbook一樣,但gitbook可能會有一些章節內容有更新,Youtube則可能抽出一些額外單元獨立出來講(例如Sorting)。建議是跟著gitbook重頭打起,或者將github上pyTutorial這個repo複製到自己的電腦中。

Section 1: Basic operations

Section 2: Counding

Section 3: List and dictionary

Section 4 and 5: Condition and Flow

輔助教材

設計教材的時候我習慣以案例為出發點來帶技術,所以我可能不會花很多時間去解釋例如資料型態、for或者if是什麼這樣的問題。因此我認為Datacamp是本課程最佳的輔助學習教材,他能夠透過互動的方式讓你了解基本的語法與操作。但是Datacamp的使用每個月是需要錢的,如果是課堂上的學生我們通常會幫忙申請教育版。以下這個網站把Datacamp的內容給複製到網頁外,可以速覽一下Datacamp上介紹Python基本語法的內容:https://www.learnpython.org/

4. 自學資源

線上互動學習平台

免費電子書

參考資源

好用的github repo

Last updated