- 課程資訊
- 課名:程式設計與資料結構 (增能學分班)
- 授課教師:王弘倫
- 助教:林柏廷
- 時間:7/24~7/27, 7/30, 7/31 (9:10~12:00, 13:00~15:50)
- 教室:研403
- 學分:2
- 課程進行
- 講述 (50min) + 休息 (10min) + 練習 (50min) + 歸納討論 (50min)
- 習題演練 (Online Judge) e-tutor
- 線上資源
- How to Think Like a Computer Scientist: Interactive Edition.
- SoloLearn
- 高中生線上解題系統
- Visualized execution
- 練習題
- Basics
- 1) Standard I/O
- 2) data in the memory: variables
- Operations on numbers
- 1) arithmetics (+, -, *, /, //, %, **)
- 2) comparisons (>, <, >=, <=, ==, !=)
- 3) logic operations (and, or, not)
- 4) order of operations
- Selection (logic if)
- 1) if...elif...else
- 2) nested selection
- Loop
- 1) while loop
- 2) for loop
- 3) nested loop (with break and continue)
- List
and tuple - 1) 1D list
- 2) object and method (mutable and immutable objects)
3) tuple assignment - 4) 2D list
- String
- 1) operations on strings
- 2) string methods
- Function
- 1) parameters and returned values
- 2) built-in functions
- 3) user-defined functions
- Recursion
- 1) gcd
- 2) palindrome
- 3) maze
- Module
- 1) random
2) math 3) string
- File manipulation
- 1) read
- 2) iterating over lines in a file
- 3) write
- 4) redirect and module sys
- User defined classes
- 1) states
- 2) constructor
- 3) methods
- tictactoe (example code)
- Data structures