Python程式設計與應用介紹與進度
教育目標與核心能力 課程大綱 課程介紹 課程進度
學年期: 114 學年 第2學期
課程系組: 人工智慧 1 年級 班
課程代碼: 1142CMNAI1K92100CB
課程名稱: Python程式設計與應用
必選修別: 選修
學分數: 3.0 學分
授課老師: 葉炳倉
開始日期: 2026/2/23
結束日期: 2026/6/28
時間表: 本週: 2026/4/25 / 建-202 / 14:10 ~ 17:00
 下週: 2026/5/2 / 建-202 / 14:10 ~ 17:00

課程簡介     Introduction
本課程旨在為學員提供 Python 程式設計的堅實基礎,並將所學知識迅速應用於現代數據處理、網路爬蟲及最新的地端 (On-Premise) 大型語言模型 (LLM) 實戰。修習者將具備獨立開發小型應用程式和深入學習人工智慧技術的能力。
先修條件:無需任何程式設計經驗,但須具備基本的邏輯思考能力與解決問題的工作流程概念。
課程單元與內容細項:分為三大主要單元,由淺入深,循序漸進
單元一:Python 程式設計核心基礎 (Fundamentals of Python Programming)
(1)程式語言基礎:變數、資料型態、運算符號。
(2)流程控制與結構條件判斷 (if/elif/else)、循環結構 (for, while)、函數 (Function) 定義與參數傳遞。
(3)進階資料結構:深入解析並實戰列表 (List)、元組 (Tuple)、字典 (Dictionary) 和 集合 (Set) 的操作、特性與應用場景。
(4)物件化基礎思維:介紹物件導向程式設計 (OOP) 的基本概念,學習如何建立自己的類別 (Class) 與物件 (Object),為進階程式設計打下堅實基礎。

單元二:數據獲取與儲存實戰應用 (Data Acquisition and Storage Applications)
(1)檔案操作與管理:讀取、寫入、處理不同格式的檔案 (如 TXT, CSV, JSON)。
(2)實戰網路爬蟲 (Web Crawler):以公開數據 (Open Data) 為實例,實習如何使用 Python 函式庫(如 Requests 和 Beautiful Soup)獲取網頁資訊。
(3)NoSQL 資料庫實戰:介紹非關聯式資料庫 (NoSQL) 的概念,並以 MongoDB 為例,練習數據的連接、查詢、插入與更新。

單元三:人工智慧與在地模型應用 (Introduction to AI and Local LLMs)
(1)AI 關鍵技術概覽:介紹基礎人工智慧應用領域,練習使用應用模組影像辨識 (Image Recognition) 和語音辨識 (Speech Recognition) 的核心原理與 Python 應用場景。
(2)大型語言模型 (LLM) 結構簡介:實作 LLM 的安裝, 練習使用Transformer 結構概念建置向量資料庫。
(3)Python 實戰地端 LLM:學習如何使用 Python 介面 (如 Ollama, Hugging Face 相關套件) 在地端環境中運行和調用小型 LLM,實作問答或文本生成等功能。

《 課程簡介 -- English 》
This course aims to provide students with a solid foundation in Python programming and quickly apply the acquired knowledge to modern data processing, web scraping, and hands-on practice with the latest On-Premise Large Language Models (LLMs). Upon completion, students will be equipped with the ability to independently develop small applications and pursue further study in artificial intelligence technologies.

Prerequisites:
1.No prior programming experience is required.
2.Basic logical thinking skills and an understanding of problem-solving workflow concepts are necessary.

Course Modules and Detailed Content:
The course is divided into three main units, progressing from fundamental to advanced topics:

Unit I: Fundamentals of Python Programming :
1.Programming Language Basics: Variables, data types, and operators.
2.Flow Control and Structure: Conditional statements (if/elif/else), looping structures (for, while), function definition, and parameter passing.
3.Advanced Data Structures: In-depth analysis and practical application of Lists, Tuples, Dictionaries, and Sets, focusing on their operations, characteristics, and usage scenarios.
4.Object-Oriented Fundamentals: Introduction to the basic concepts of Object-Oriented Programming (OOP), learning how to create custom classes and objects, preparing a solid foundation for advanced programming skills.

Unit II: Data Acquisition and Storage Applications
1.File Operations and Management: Reading, writing, and processing various file formats (e.g., TXT, CSV, JSON).
2.Web Crawler Practical: Using Open Data as a case study, practice acquiring web information using Python libraries (such as Requests and Beautiful Soup).
3.NoSQL Database Practical: Introduction to the concept of Non-Relational Databases (NoSQL), using MongoDB as an example to practice data connection, querying, insertion, and updating.

Unit III: Introduction to AI and Local Model Applications
1.AI Key Technologies Overview: Introduction to core principles and Python application scenarios in fundamental AI fields, including Image Recognition and Speech Recognition, with practice using application modules.
2.Introduction to Large Language Model (LLM) Structure: Implementation of LLM setup, practice building vector databases using Transformer architecture concepts.
3.Python Practice with On-Premise LLM: Learning how to use Python interfaces (such as Ollama, Hugging Face related packages) to run and call small LLMs in a local environment, implementing functionalities like question answering or text generation.

Material   上課教材  
Python技術手冊 作者:Alex Martelli, 黃銘偉譯 出版社:O'REILLY
Python 資料運算與分析實戰 作者:中久喜 健司著,莊永裕譯 旗標書號:FT766 ISBN:9789863124962
Python 資料科學與人工智慧應用實務 作者:陳允傑著 旗標書號:FT745 ISBN:9789863125297
使用llama模型建立大模型本機系統, 深智 DM2519 ISBN 978-626-7569-63-4

課程要求     Requirement
《 上課要求 》

《 報告要求 》

《 課程評分方式 》
1.作業:30% 2.期中考:30% 3.期中報告:40%

《 討論要求 》

《 其他要求 》

Office Hour   輔導時間  
星期一至星期四 14:00 至 17:00
晚上時間必須事先預約

教學目標     Objective
課程成果完成本課程後,修習者將能夠:
熟練運用 Python 進行邏輯編程,掌握常見資料結構的操作。
獨立完成簡單的網路數據獲取(爬蟲)與 NoSQL 資料庫的存取。
對現代 AI 核心技術有基本認識,並能實際操作地端 LLM 模型。