> For the complete documentation index, see [llms.txt](https://leotam.gitbook.io/cm540-05-2025-c/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://leotam.gitbook.io/cm540-05-2025-c/readme.md).

# CM540 課程資料

**tags: `Python`** **`CM-540`** **`Introduction`**

## Notes

<https://leotam.gitbook.io/cm540-05-2025-c/>

## 本人聯絡方式：

[Leotam@cpttm.org.mo](https://github.com/mhk00123/CM540-Noted/blob/main/Leotam@cpttm.org.mo)

## 作業/考試 繳交

* 命名規則 : `中文姓名_日期_作業N`
* 可接受檔案：`.py`、`.ipynb`
* 壓縮檔：`.zip`、`.7z`

## Course Grading

* 課堂表現
* 堂上練習
* Final Project

## 課程時長

{% hint style="info" %}
36小時 : 12堂 x 3小時
{% endhint %}

| 課程內容            | 需時     | 堂數    |
| --------------- | ------ | ----- |
| 認識Python、搭建編程環境 | 3小時    | 1堂    |
| 編程基礎邏輯          | 12小時   | 4堂    |
| API應用、Python庫應用 | 9小時    | 3堂    |
| 資料爬取、整理、輸出圖表    | 9小時    | 3堂    |
| Final Project   | 3小時    | 1堂    |
| Total           | `36小時` | `12堂` |

## 本課程會學習的知識

1. 認識Python、搭建編程環境：
   * 本機搭建
   * Jupyter Notebook
   * 執行`HelloWord`程式
2. 編程基礎邏輯：
   * 變數 Variable
     * 變數命名 (`PEP8`)
     * 變數類型(`int`, `float`, `string`)
     * 多個變數處理(`list`, `tuple`, `dictionary`)
   * 條件判斷(`if`, `else`)
   * 迴圈(`for`, `while`)
   * 函數 Function
     * Standard Library
     * Third-Part Libaray
   * 文字/檔案處理
     * 輸入流
     * 輸出流
       * `txt` 文字檔
       * `Excel` , `JSON` 檔案
3. 透過 Python 爬取資料：
   * 認識資料意義
     * `HTML` 介紹
     * `API` 介紹
   * 透過 Python 爬取資料
     * `Requests`
     * `自動化操作`
     * Regular expression - 正則表達式
4. 整理/處理資料：
   * 數據清洗
     * `Pandas`
   * 畫圖
     * `Matplotlib`
5. 簡單計算機概論、數學知識、演算法、資料結構
