MOOC Notes: MITx 6.00.1x Introduction to Computer Science and Programming Using Python

Computer

  • calculation
    • build-in
    • ones you define
  • storage

Algorithm

  • steps
  • flow of control
  • when to stop

Machine Architecture

  • memory
  • Arithmetic Logic Unit, Control Unit
  • input, output

Fixed Program Computer

  • compute one computation

Stored Program Computer

  • instructions stored
  • special program (interpreter) executes each instruction

Turing Complete

  • all problems can be computed with only 6 primitives

  • a Turing machine can simulate any other Turing machine

  • a Turing-complete language can write anything computable like any other language

Programming Language

  • syntax
  • static semantics
  • semantics

Python

  • data objects
  • type
  • scalar objects
    • integers
    • real numbers
    • Boolean
    • apecial
  • output
    • print
    • return
  • input
    • input
  • IDE
    • text editor
    • shell
    • integrated debugger
  • control flow
    • while loops
    • for loops
    • break
  • iteration
  • guess & check
  • recursion
  • structured types
    • Tuple
    • List
    • Dictionary
  • testing classes
    • unit testing
    • regression testing
    • integration testing
  • testing approachs
    • intuition
    • random testing
    • black box testing
    • glass box testing
  • runtime bugs
    • overt, covert
    • persistent, intermittent
  • debugging tools
    • built in
    • print
  • exception
    • fail silently
    • return incorrect value
    • signal error
  • assertion
    • execution halts
    • check inputs
    • check outputs
  • object oriented programming
    • Object (built-in types or your own types)
    • Class
    • methods
    • why? bundle together objects, abstract definition and usage
    • inheritance
    • Generator
  • algorithm complexity
    • Big Oh (order of growth)
    • classes: O(1), O(log n), O(n), O(n log n), O(n^c), O(c^n)
  • algorithm
    • searching
    • linear search: O(n)
    • binary search: O(log n)
    • sorting
    • bogo sort: unbounded O()
    • bubble sort: O(n^2)
    • selection sort: O(n^2)
    • merge sort: O(n log n)



许可协议:知识共享 署名-非商业性使用-禁止演绎 4.0  国际许可协议 / Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License
封面图:来自 Unsplash 的 Natalie Perea / Photo by Natalie Perea on Unsplash


image.png

扫码关注我


磊磊

生于西府,长于北疆

Shanghai, China https://changshiban.com
温馨提示:以下为赞助商广告,用以维持服务器费用,从而继续创作原创内容,敬请谅解