2023-先修課程-Python語言程式入門(9-12月)

  • 0.0
  • 218 學生
  • 報名時間 : 2023/01/01 - 2023/12/31
  • 開課時間 : 2023/01/01 - 2023/12/31
  • 課程費用 : 800 元

報名時間結束

介紹

本課程強調動手嘗試程式,鼓勵學生和電腦執行環境互動,直接體會電腦語言的邏輯,而不是用死背的。在課程設計上採取循序漸進的方式,由最基礎的資料類型開始,包括流程、函式、序列等。透過生活化的比喻,來加深學習時的印象,啟發學生動手撰寫程式,進一步引導學生到自我領域相關應用。

課程目標

1. 解讀程式語言的原理,語法、語意、執行步驟、輸入與輸出。

2. 套用程式語言的邏輯概念,撰寫簡單的程式,並予測試、除錯。

3. 學會引入現有套件到自己撰寫的程式裡解決特定問題。

教師提供課程製作講義,並放置於課程網站之中。

章節

* 以下章節為預覽,請點報名後點選開始上課,進入課程
  • 第1週:介紹及環境設置|Introduction and Environment Setup
    • ● 課程及Python介紹|Course Overview and Python Introduction
    • ● Python示範|Python Demo
    • ● 練習1
    • ● 開發環境 & 課程主題|Development Environment & Course Topics
    • ● 專有名詞介紹|Terminology
    • ● 練習2
    • ● Cygwin(Windows使用者)|Cygwin (for Windows Users)
    • ● IDLE(所有使用者)|IDLE (for All Users)
    • ● Jupyter Notebook(所有使用者)|Jupyter Notebook (for All Users)
    • ● macOS Terminal(Mac使用者)|macOS Terminal (for Mac Users)
    • ● Linux Terminal(Ubuntu使用者)|Linux Terminal (for Ubuntu Users)
    • ● 指令介面|Command-Line Interface
    • ● 練習3
    • ● 文字編輯器|Text Editor
    • ● 練習4
    • ● 00-jupyter
    • ● 01-intro
    • ● 02-terminology
    • ● 02-CLI
  • 第2週:Python概觀|A Quick Tour of Python
    • ● 輸入/輸出、註解|Input/Output, Comments
    • ● 練習1
    • ● 運算元|Operators
    • ● 練習2
    • ● 整數|Integers
    • ● 練習3
    • ● 浮點數與複數|Floating Point Numbers and Complex Numbers
    • ● 練習4
    • ● 字串運算元|String Operators
    • ● 練習5
    • ● 列表、元組|Lists, Tuples
    • ● 字典、集合|Dictionaries, Sets
    • ● 練習6
    • ● for迴圈|for Loops
    • ● 練習7
    • ● if判斷式、while迴圈|if Statements, while Loops
    • ● 練習8
    • ● 函式|Functions
    • ● 練習9
    • ● 模組|Modules
    • ● 練習10
    • ● range()函數|range() Function
    • ● open()函式|open() Function
    • ● 練習11
    • ● 物件導向程式|Object-Oriented Programming
    • ● 物件導向程式範例|Example of Object-Oriented Programming
    • ● 練習12
    • ● 語句(陳述)、分隔符|Statements, Delimiters
    • ● 練習13
    • ● 賦值|Assignments
    • ● 練習14
    • ● 關鍵詞、標示符|Keywords, Identifiers
    • ● 練習15
    • ● 程式風格|Coding Style
    • ● 練習16
    • ● 03-tour
  • 第3週:基本資料模式、Python應用程式|Basic Data Types, Python Applications
    • ● 字元、ASCII編碼|Characters, ASCII Code
    • ● 練習1
    • ● ord()和chr()函式|ord() & chr() Functions
    • ● 練習2
    • ● ASCII控制碼|Control Characters in ASCII
    • ● 練習3
    • ● 萬國碼|Unicode
    • ● 字面值vs.表達式vs.變數|Literals vs. Expressions vs. Variables
    • ● 練習4
    • ● 數值、數字|Numbers, Numerals
    • ● 練習5
    • ● 整數字面值|Integer Literals
    • ● 練習6
    • ● 進制轉換|Integer Literal Conversion
    • ● 練習7
    • ● 位元運算|Bitwise Operators
    • ● 練習8
    • ● 負整數表示法|Negative Integer Representation
    • ● 位元移位|Bit Shifting
    • ● 練習9
    • ● 數學函式|Math Functions
    • ● 布林值、短路求值(且)|Boolean, Short-Circuit Evaluation (and)
    • ● 練習10
    • ● 短路求值(或)|Short-Circuit Evaluation (or)
    • ● 比較運算符|Comparison Operators
    • ● 練習11
    • ● Unix指令工具介紹:uniq|Introduction to Unix Utility: uniq
    • ● Unix指令工具介紹:cat|Introduction to Unix Utility: cat
    • ● Unix指令工具介紹:grep|Introduction to Unix Utility: grep
    • ● Python程式執行|Running a Python Script
    • ● 指令介面參數|Command-Line Arguments
    • ● 04-basic-types
    • ● 05-app
  • 第4週:Python應用程式(續)、字串|Python Applications (cont
    • ● 範例程式|Template Code
    • ● 練習1
    • ● uniq指令實作|Implementing uniq in Python
    • ● cat指令實作|Implementing cat in Python
    • ● grep指令實作|Implementing grep in Python
    • ● grep指令實作(續)|Implementing grep in Python (cont
    • ● 練習2
    • ● 跳脫字元|Backslash Escape
    • ● 練習3
    • ● 字元字面值、單引號vs.雙引號|Char Literals, Single Quotes vs. Double Quotes
    • ● 練習4
    • ● 原始字串|Raw Strings
    • ● 多行字串、三重引號|Multiline Strings, Triple Quotes
    • ● 練習5
    • ● 字串格式化、%格式化運算元|String Formatting, % Formatting Operators
    • ● 練習6
    • ● 數值字串格式化|Number Formatting
    • ● 練習7
    • ● 字元格式化|Character Formatting
    • ● 練習8
    • ● 字串.format()函式:位置|str.format() Method: by Position
    • ● 字串.format()函式:索引|str.format() Method: by Index
    • ● 字串.format()函式:關鍵字|str.format() Method: by Keyword
    • ● 練習9
    • ● 字串.format()函式:數值字串格式化|str.format() Method: Number Formatting
    • ● 字串.format()函式:對齊|str.format() Method: Padding with Alignment
    • ● 應用範例:乘法表|Example App: Multiplication Table
    • ● f字串|f-strings
    • ● 練習10
    • ● f字串:表達式、數值字串格式化|f-strings: Expression, Number Formatting
    • ● 字串.split()函式|str.split() Method
    • ● 練習11
    • ● wc指令實作|Implementing Unix Utility: wc
    • ● 字串.join()函式|str.join() Method
    • ● 練習12
    • ● string模組|string Module
    • ● 練習13
    • ● 06-strings
  • 第5週:序列、集合、字典|Sequences, Sets, Dictionaries
    • ● 序列、索引、截取|Sequences, Indexing, Slicing
    • ● 練習1
    • ● 截取(續)、轉換成列表或元組|Slicing (cont'd), Conversion to List or Tuple
    • ● 序列運算元|Sequence Operators
    • ● 練習2
    • ● 序列方法|Sequence Methods
    • ● 序列方法範例|Example Sequence Methods
    • ● 練習3
    • ● 序列函式|Sequence Functions
    • ● 改變vs.新建並捨棄|Mutate vs. Create & Abandon
    • ● 列表構建|List Comprehension
    • ● 練習4
    • ● 淺複製vs.深複製|Shallow Copy vs. Deep Copy
    • ● 練習5
    • ● 集合|Sets
    • ● 練習6
    • ● 集合構建|Set Comprehension
    • ● 集合運算元|Set Operators
    • ● 集合方法|Set Methods
    • ● 集合方法範例|Example Set Methods
    • ● 字典|Dictionaries
    • ● 練習7
    • ● 字典存取及複製|Accessing, Modifying, and Copying Dictionaries
    • ● 練習8
    • ● 字典鍵的限制、排序、字典套用於字串格式化|Restrictions on Keys, Sorting, String Formatting with Dictionaries
    • ● 07-seq
    • ● 08-sets
    • ● 09-dict
  • 第6週:控制流程|Control Constructs
    • ● if-else陳述式|if-else Statements
    • ● 練習1
    • ● 範例:翻譯(版本1)|Example: Translation (First Version)
    • ● 練習2
    • ● 範例:翻譯(版本2,解法A)|Example: Translation (Second Version, Solution A)
    • ● 範例:翻譯(版本2,解法B)|Example: Translation (Second Version, Solution B)
    • ● 轉換成函式|Conversion to Function
    • ● 條件表達式|Conditional Expressions
    • ● 範例:閏年|Example: Leap Year
    • ● if-elif-else陳述式|if-elif-else Statements
    • ● 練習3
    • ● 化簡回傳布林值的if-else|Eliminating if-else When Returning Boolean
    • ● 練習4
    • ● while迴圈|while Loops
    • ● 範例1:實作product()函式|Example 1: Implementing product() function
    • ● 無限迴圈+break陳述式|Infinite Loop + break Statement
    • ● 範例2:實作index()函式|Example 2: Implementing index() function
    • ● while-else陳述式|while-else Statements
    • ● 用return離開while迴圈|Exit while Loop Using return
    • ● 範例3:重複查詢字典|Example 3: Repeated Dictionary Lookup
    • ● 範例4:stack指令轉譯器|Example 4: Stack-Command Interpreter
    • ● continue陳述式|continue Statements
    • ● for迴圈、在for迴圈拆解元組|for Loops, for Loops with Unpacking Tuples
    • ● 練習5
    • ● 在for迴圈用enumerate()函式|for Loops with enumerate() function
    • ● 練習6
    • ● 10-conditional
    • ● 11-loops
  • 第7週:例外、檔案|Exceptions, Files
    • ● 例外介紹|Introduction to Exceptions
    • ● 常見例外|Common Exceptions
    • ● 練習1
    • ● try-except陳述式、例外的控制流程|try-except Statements, Control Flow of Exceptions
    • ● 處理多個例外、例外參數|Handling Multiple Exceptions, Exception Arguments
    • ● 練習2
    • ● 巢狀try-except陳述式|Nested try-except Statements
    • ● try-except-finally|try-except-finally
    • ● 練習3
    • ● 例外類別階層|Exception Class Hierarchy
    • ● 發起例外|Raising Exceptions
    • ● 練習4
    • ● 斷言|Assertions
    • ● 檔案I/O介紹|Introduction to File I/O
    • ● 開啟檔案、檔案路徑|Opening Files, File Path
    • ● 練習5
    • ● 讀取檔案|Reading Files
    • ● 練習6
    • ● 寫入檔案|Writing Files
    • ● with-as陳述式、seek()和tell()方法|with-as Statements, seek() and tell() Methods
    • ● 練習7
    • ● 標準輸入輸出|Standard I/O
    • ● 練習8
    • ● I/O重新導向、管道|I/O Redirection、Pipe
    • ● 標準錯誤輸出|Standard Error Output
    • ● uniq指令實作(改進)|Implementing uniq in Python (Revisit)
    • ● 文字檔vs.二進制檔案 |Text Files vs. Binary Files
    • ● 位元組|bytes
    • ● 練習9
    • ● os模組|os Module
    • ● 12-exceptions
    • ● 13-files
  • 第8週:函式|Functions
    • ● 函式用語|Terminology of Functions
    • ● 練習1
    • ● 回傳值、函式物件vs.函式呼叫|Return Value, Function Object vs. Function Call
    • ● 練習2
    • ● 傳遞參數|Passing Parameters
    • ● 練習3
    • ● 有預設值的選填參數|Optional Parameters with Default Values
    • ● 練習4
    • ● 可變長度參數|Variable-Length Arguments
    • ● 可變關鍵字參數|Variable-Keyword Arguments
    • ● 拆解參數|Unpacking Parameters
    • ● 練習5
    • ● 拆解字典當參數|Unpacking Dictionary as Named Parameters
    • ● 代號表介紹|Introduction to Symbol Table
    • ● 可視範圍、dir()函式|Scope, dir() Function
    • ● 刪除代號|Deleting a Symbol
    • ● 代號表的運作|Implementation of Symbol Tables
    • ● 標示符連結規則|Rules for Identifier Binding
    • ● 練習7
    • ● 範例:totalWithTax函式(global關鍵字)|Example: totalWithTax Function (global Keyword)
    • ● 練習8
    • ● 改進totalWithTax函式(自動化測試)|Improve totalWithTax Function (Automated Testing)
    • ● 練習9
    • ● 示範totalWithTax函式|Demo totalWithTax Function
    • ● 14-function-1
    • ● 15-function-2
  • 第9週:函式(續)、遞迴|Functions (cont
    • ● 外掛函式介紹|Introduction to Plug-in Functions
    • ● 練習1
    • ● Lambda表達式|Lambda Expressions
    • ● 練習2
    • ● 範例:用字典順序排序|Example: Sorting in """"""""""""""""True Dictionary Order""""""""""""""""
    • ● 練習3
    • ● 範例:排序星期字串|Example: Sorting Day-of-Week Strings
    • ● 練習4
    • ● map()函式|map() Function
    • ● 用到Lambda的map()函式|map() with Lambda
    • ● 練習5
    • ● 用到多個序列的map()函式、zip()函式|map() with Multiple Sequences, zip() Function
    • ● 練習6
    • ● filter()函式|filter() Function
    • ● 練習7
    • ● 函式表|Function Table
    • ● 內部函式|Inner Functions
    • ● 文件字串|DocString
    • ● 練習8
    • ● Python風格指南|Python Style Guide
    • ● 練習9
    • ● 遞迴介紹|Introduction to Recursion
    • ● 範例:階乘|Example: Factorial
    • ● 練習10
    • ● 追溯遞迴函式的執行堆疊|Tracing the Execution Stack of Recursive Function
    • ● 範例:費氏數列|Example: Fibonacci
    • ● 練習11
    • ● 範例:計算列表元素數量|Example: Counting Elements in a List
    • ● 練習12
    • ● 範例:計算列表元素數量(另解)|Example: Counting Elements in a List (Alternatives)
    • ● 範例:計算檔案數量|Example: Counting Files
    • ● 練習13
    • ● 範例:遞迴查找|Example: Recursive Finding
    • ● 範例:縮排|Example: indentation
    • ● 練習14
    • ● 範例:大綱編號(構想)|Example: Outline Numbering (Approach)
    • ● 範例:大綱編號(程式碼)|Example: Outline Numbering (Source Code)
    • ● 練習15
    • ● 16-functions-3
    • ● 17-recursion
  • 第10週:物件導向程式|Object-Oriented Programming
    • ● 物件介紹|Introduction to Objects
    • ● 練習1
    • ● 複製物件|Copying an Object
    • ● 練習2
    • ● 實例化物件|Instantiating an Object
    • ● 練習3
    • ● 程序導向vs.物件導向程式設計|Procedure-Oriented vs. Object-Oriented Programming
    • ● 練習4
    • ● 範例:turtle繪圖|Example: turtle Graphics
    • ● 示範turtle繪圖|turtle Graphics Demo
    • ● 範例:二維Point類別、建構子|Example: 2D Point Class, Constructors
    • ● 屬性|Attributes
    • ● __repr__方法|__repr__ Method
    • ● 練習5
    • ● 函式vs.方法|Function vs. Method
    • ● Point類別的方法|Methods for Point Class
    • ● @property裝飾器|@property Decorator
    • ● 練習6
    • ● 類別跟實例的命名空間|Name Spaces of Class and Instance
    • ● 類屬性|Class Attributes
    • ● 練習7
    • ● 範例:DateTime類別|Example: DateTime Class
    • ● 練習8
    • ● Setter方法實作|Implementation of the Setter Methods
    • ● 透過__dict__方法存取屬性|Attribute Access Through __dict__ Method
    • ● 把Getter/Setter包裝成屬性存取|Package Getter/Setter as Attribute Access
    • ● 類方法|Class Methods
    • ● 靜態方法|Static Methods
    • ● 18-oop1
  • 第11週:物件導向(續)|Object-Oriented Programming (cont
    • ● 繼承介紹|Introduction to Inheritance
    • ● isinstance()和issubclass()函式|isinstance() and issubclass() Functions
    • ● 練習1
    • ● 繼承|Subclassing
    • ● 練習2
    • ● 範例:MyList類別|Example: MyList Class
    • ● MyList類別的find()方法|find() Method for MyList Class
    • ● MyList類別的sort()方法|sort() Method for MyList Class
    • ● 深入看sort()方法|Potential Issue with sort() Method
    • ● MyList.__repr__()方法的代號表|Symbol Table for MyList.__repr__() Method
    • ● MyList.sort()方法的代號表|Symbol Table for MyList.sort() Method
    • ● MyList.find()方法的代號表|Symbol Table for MyList.find() Method
    • ● 範例:ColorPoint類別|Example: ColorPoint Class
    • ● 多型介紹|Introduction to Polymorphism
    • ● 練習3
    • ● 「運算符」形式的語法vs.「方法」形式的語法|Operator vs. Method Syntax
    • ● 練習4
    • ● 範例:Vector類別|Example: Vector Class
    • ● 練習5
    • ● Vector類別中的「過載」|Overloading in Vector Class
    • ● 「可過載」運算符:原地賦值|Overloadable Operators: Augmenting Assignments
    • ● 練習6
    • ● 其他「可過載」運算符|Other Overloadable Operators
    • ● __getitem__和__setitem__方法的用法|Usage of getitem and setitem Methods
    • ● 練習7
    • ● 實作__getitem__和__setitem__方法|Implementing __getitem__ and __setitem__ Methods
    • ● 運算符過載的一些註記|Notes about Operator Overloading
    • ● 練習8
    • ● 19-oop2

常見問題

線上成績單 :
此課程線上成績單申請費用為免費

學習履歷 :
此課程學習履歷申請費用為免費


(1) (取得修課證明)於課程內完成兩次線上測驗,每次測驗各可考兩次,將取高分測驗為評分依據,總分達60分以上可申請線上成績單。**清華大學學生此證明無法抵免學分,其他學校請查閱認抵資訊。

清華雲修課證明後續處理詳網頁:https://mooc.nthu.edu.tw/news/info/16

(2) (取得成績證明)
1. 完全採取線上學習的同學(不參與實體期末考試):線上考試、作業、報告成績(合計100分)累計至60分,即可申請「線上成績單」(不得作為清華學分採計之用)。
2. 線上學習+實體考試同學:實體考試佔50%,線上測驗成績50%,若總成績超過60分,核發清華大學學分(視為自由選修)。

實體考試配分如下:

  • 觀看影片:20%

  • 筆試:40%
  • 上機:40% ,上機考共3題
    • 答對一題得60分
    • 答對兩題得85分
    • 答對三題得100分

報名費及考試日期等詳見網址:https://mooc.nthu.edu.tw/news/info/25 ,可於課程結束後,另外報名參加在清華大學所舉辦的期末實體考,報名費及考試日期等詳見網址:https://mooc.nthu.edu.tw/news/info/25
**112年辦理實體考試日程等相關資訊預計於8月初公布,
實體考試定為:112年8月31日(四)、112年9月1日(五)兩日。
考試成績結算:112年9月5日(二)
考試成績公告:112年9月8日(五)

講師

teacher Picture

周百祥

國立清華大學資訊工程學系 教授

查看講師

評價

0.0

平均評價

本課程尚未有人來評價

預覽影片 & 簡介

2023-先修課程-Python語言程式入門(9-12月)

本課程適合準大一新生選讀
本課程強調動手嘗試程式,鼓勵學生和電腦執行環境互動,直接體會電腦語言的邏輯,而不是用死背的。在課程設計上採取循序漸進的方式,由最基礎的資料類型開始,包括流程、函式、序列等。透過生活化的比喻,來加深學習時的印象,啟發學生動手撰寫程式,進一步引導學生到自我領域相關應用。