Exam 1 Answers
CS 111, Winter 2010
0. [Students did well on this with various answers, so Ill omit my answer.]
1A. Here are short implementations.
def encipherRot13(s):
return encipherRepeatedPad(s, N)
def encipherCaesar(s, p):
return encipherRepeatedPad(
Exam 1
CS 111, Winter 2010
You have 60 minutes.
Show your work and explain your answers. Good work often earns partial credit. A correct
answer with no explanation often earns little or no credit.
If you are asked to write code but you do not know the exa
Exam B Solutions
CS 111, Spring 2012
A. The kernel [-1, -2, 0], [-2, 0, 2], [0, 2, 1] works. (This is not the only way to
answer this question. In general, we probably want zeroes along the diagonal, positive numbers
below the diagonal, and negative numbe
Exam A Solutions
CS 111, Spring 2012
A.
a. player: String (str).
b. hasWon: Function (function).
c. m: List (list). (The list contains two integers. In some cases, m is None, which has the
type NoneType. But I did not insist on this level of detail, when