Key ideas from last time




Pseudocode for expressing algorithms




Pseudocode is a compromise

  1. natural language ⇒ pseudocode ("algorithm discovery")
  2. pseudocode ⇒ programming language



Sequential operations




Example: Compute average of 3 values

(Practice problem #1, p. 45)
  get input values x, y, z
  sumx + y + z
  avgsum / 3
  print avg



Conditional operations




Iterative operations




Bottom-up reductionism