types of knowledge

  • declarative knowledge
    • statement of fact
  • imperative knowledge
    • a recipe or how-to
    • an algorithm

basic computer machine architecture

Imgur

  • recipes for mechanical process in the machine
    • fixed program computer
    • stored program computer

stored program computer

  • sequence of instruction stored
    • built from set of primitive instructions
  • interpreter executes each instruction in order

aspects of a language

  • primitive constructs
  • syntax
  • static semantics

python programs

  • a program is a sequence of definitions and commands
  • commands instruct interpreters to do something

objects

  • programs manipulate data objects
    • objects have a type
    • use type()
  • objects are scalar or non-scalar
  • scalar objects cannot be subdivided
    • in python, scalar objects are
      • int
      • float
      • bool
      • NoneType
  • non-scalar objects have internal structure that can be accessed

type conversions

  • float(3) or int(3.9)

binding and changing binding

pi = 3.14
radius = 2.2
area = pi*(radius**2)
radius = radius+1