CS21: Quiz 5 Study Guide

In addition to the concepts below, you should also know the concepts that were tested on all of the previous quizzes.

You should be able to define and explain the following terms:

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

Practice problems:

  1. Multiple choice problem 6 on page 460 (Chapter 13)
  2. Discussion question 1 on page 462 (Chapter 13)
  3. Write a sort function (any sort) that takes in a list and sorts it. Show what a call to your sort function would look like from main.
  4. Write a function that takes a value, k, and a list of values, and for every occurrence of k in the list, the function should replace that list item with k squared. Your function should also return the number of times k appeared in the list. Show what a call to your function would look like from main.
  5. Programming exercises 10 and 15 from Chapter 4 (pgs. 120-121)
  6. Programming exercise 11 from Chapter 11 (page 380)
  7. Write a program that reads in the following data from a grades file and stores the data in a python dictionary that allows a user to look up each student's grade:
    lisa:98
    betsy:100
    charlie:91
    jeff:82
    mandy:88
    jon:86
    andy:77