CS21: 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. Write a program that reads in the following data from a file and stores the data in a python dictionary:
    lisa:98
    betsy:100
    charlie:91
    jeff:82
    amanda:88
    jon:86
    andy:77
    
  4. Given any specific definite (for) loop, write an indefinite (while) loop that performs the same computation.
  5. Programming exercises 10 and 15 from Chapter 4 (pgs. 120-121)
  6. Multiple choice problems 1,2,5 on page 260 (Chapter 8)
  7. Discussion questions 1 and 3 on page 261
  8. Programming exercise 11 from Chapter 11 (page 380)