CS21: Quiz 2 Study Sheet

In addition to all concepts from Quiz 1,

You should be able to define the following terms:

You should understand and be able to use the following Python concepts:

Practice problems:

  1. Programming exercises 1, 4, and 8 on page 228-229 of Zelle; excerise 10 on page 120
  2. True/false questions 1, 2, 4, 7, 8 on pages 225-226 of Zelle; questions 1, 2, 3, and 4 on page 115
  3. Multiple choice problems 2, 3, 5, 6, 7, 10 on pages 226-227 of Zelle.
  4. Discussion question 1, parts (a) through (f) on page 116 of Zelle.
  5. Trace the behavior of the following program:
      x = 3
      print 0,x
      for i in range(1,6):
          if x % 2 == 0:
              x = x / 2
          else:
              x = (3*x+1)/2
          print i,x