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:
- definite loop
- indefinite loop
- top-down design
- unit testing
- bottom-up development
- stubbed-out function
- pseudocode
- file variable
- newline character
- python list
- python dictionary
- key-value pairs
You should understand and be able to use the following Python concepts:
- while (indefinite) loops
- file methods like open() and read()
- definite loops on a file
- string methods like strip(), isupper(), islower(), and split()
- the list append() method
- dictionaries, including
- the empty dictionary
- adding a key-value pair to a dictionary
- accessing the value for a key in the dictionary
- dictionary methods like keys() and values()
- the in boolean operator for lists, strings, and dictionaries
- You should also be able to write basic operations using lists, files,
and dictionaries, such as
- read and print all lines in a file
- read all lines in a file and store as a list
- print all key-value pairs in a dictionary
Practice problems:
- Write a for loop that prints out all even numbers from 2 to 20.
- Write a while loop that prints out all even numbers from 2 to 20.
- 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
- Given any specific definite (for) loop, write an indefinite (while) loop
that performs the same computation.
- Programming exercises 10 and 15 from Chapter 4 (pgs. 120-121)
- Multiple choice problems 1,2,5 on page 260 (Chapter 8)
- Discussion questions 1 and 3 on page 261
- Programming exercise 11 from Chapter 11 (page 380)
include("../style/footer.php"); ?>