CS21B: Quiz 4 Study Guide

In addition to the concepts below, you should also know the concepts from Quiz 1, Quiz 2, and Quiz 3. Many of the earlier concepts -- especially functions -- are fundamental to what we've been studying recently.

You should be able to define the following terms:

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

Practice problems:

  1. Write a for loop that prints out all even numbers from 2 to 20.
  2. Write a while loop that prints out all even numbers from 2 to 20.
  3. Given any specific definite (for) loop, write an indefinite (while) loop that performs the same computation.
  4. Write a function randList(size, low, high) that returns a list of random numbers of length size containing values between low and high.
  5. Multiple choice problems 1,2,5 on page 260 (Chapter 8)
  6. Discussion questions 3 on page 261