假設沒有學過任何程式語言下,透過 Python,深入淺出地說明如何利用計算的 (computational) 概念去解題。在短短的 286 頁 (A4 大小),舉了許多的例子說明程式的應用。以下是作者在 MIT 開課的一學期課綱 (一學期 15 週,上課 24 小時,每週一小時的習題課 (Recitation))
of the course; what is computation; introduction to data types, operators, and variablesGoals - Operators and operands; statements; branching, conditionals, and iteration
- Common code patterns: iterative programs
- Decomposition and abstraction through functions; introduction to recursion
- Floating point numbers, successive refinement, finding roots
- Bisection methods, Newton/Raphson, introduction to lists
- Lists and mutability, dictionaries,
, introduction to efficiencypseudocode - Complexity; log, linear, quadratic, exponential algorithms
- Binary search, bubble and selection sorts
- Divide and conquer methods, merge sort, exceptions
- Testing and debugging
- More about debugging, knapsack problem, introduction to dynamic programming
- Dynamic programming: overlapping subproblems, optimal substructure
- Analysis of knapsack problem, introduction to object-oriented programming
- Abstract data types, classes and methods
- Encapsulation, inheritance, shadowing
- Computational models: random walk simulation
- Presenting simulation results, Pylab, plotting
- Biased random walks, distributions
- Monte Carlo simulations, estimating pi
- Validating simulation results, curve fitting, linear regression
- Normal, uniform, and exponential distributions; misuse of statistics
- Stock market simulation
- Course overview; what do computer scientists do
沒有留言:
張貼留言