CS21: Quiz 2 Study Guide

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, 3, and 11 on page 228-229 of Zelle.
  2. True/false questions 1, 2, 4, 7, 8 on pages 225-226 of Zelle.
  3. Multiple choice problems 2, 3, 5, 7, 10 on pages 226-227 of Zelle.
  4. Discussion question 1, parts (a) through (f) on page 116 of Zelle.
  5. Discussion questions 1 and 2 on page 71 of Zelle.
  6. 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