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
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
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 byNatalie Pereaon Unsplash
So, Sing Along
扫码赞赏我
领取专属 10元无门槛券
私享最新 技术干货