-
w1
-
Lecture 1
-
computation basics
-
knowledge types
- declarative
- fact
- imperative
- how-to
- algorithms/recipes
-
computer types
- Fixed Program Computers
- Stored Program Computer
- stores and manipulates instructions
-
Lecture 2
-
types
-
non-scalar
- int
- float
- bool
- true / False
- bool operators
- not and or
-
scalar
- strings
- indexing
- str[0]
- 0123 -4-3-2-1
- slicing
- str[start:stop:step]
-
arith. operations
-
() ** * / + - %
- / - returns quotient
- % - returns remainder
-
comparison
- > >= < <= == !=
- variables and naming
-
funcs
- int(float/str)
- float(int/str)
- str()
- type(object)
- scalar-obj.len()
- round(float)
- print()
-
raw_input(['prompt'])
- returns string
general input from users
- input[]
- returns what entered
-
in operator
- in / not in
-
comments
- #
'''
multi-line
comment
'''
-
conditional
- constant programms
-
branched programms
- if True:
body
elif True:
body
else:
body
- nested conditionals
- w2