Spring 2025 | Michael Ball |
| N/A | For the midterm: Thanks CSM for the walkthroughs! |
Fall 2024 | John DeNero, Jedi Tsang, Shm Almeda |
|
| For the midterm: Thanks CSM for the walkthroughs! |
Summer 2024 | Eric Kim |
|
| For the midterm: We apologize for the low quality PDFs for this semester, it was all online and unfortunately we don't have better ones.
For the final: We apologize for the low quality PDFs for this semester, it was all online and unfortunately we don't have better ones. |
Spring 2024 | Michael Ball |
|
| For the midterm: Thanks CSM for the walkthroughs! |
Fall 2023 | Michael Ball |
|
| For the midterm:
Thanks CSM for the walkthroughs! Please note some typos in the exam and/or walkthrough videos below:
- This exam had many clarifications during the exam, which you can view
here.
- Q1a: In the video walkthrough, the narrator writes the indices of the outermost list as 0, 1, 2, 4 in purple. However, it should be 0, 1, 2, 3.
- Q2e: In the video walkthrough around 14:10, the narrator says the return value of the
huh frame
is a list like this: [lambda, lambda, [lambda]] . However, it should be: [lambda, lambda, lambda] .
- Q2f: Similar to 2(e), in the video walkthrough around 20:00, the narrator says the return value of the
huh frame is a list like this: [lambda, lambda, [lambda, lambda]] .
However, it should be: [lambda, lambda, lambda, lambda] .
- Q4d: The solution is distorted on the PDF. Here is the full solution: The code errors and does not run.
The call to the
dot_prod on line 6 passes arguments improperly; the arguments must be curried.
In other words, they must be passed in like this: dot_prod([2, 3, 2, 1, 4])([10, 20, 30, 40, 50]) .
- Q5e: The solution should say
chars.items() not chars.keys()
- Q8c: The correct solution is
type(root[key]) == str .
- Q8d: The correct solution is
root[key] != "mrrobot" , but note that for the exam we gave all students credit for this question because the wording was ambiguous.
For the final:
Thanks CSM for the walkthroughs! Please note some typos in the exam and/or walkthrough videos below:
- For Q1g, the second answer option should be
["Odd", "Even", "Odd", "Even"]
- For Q3b, the solution should be "The code block errors and does not run." This is because Python disallows changing the size of a dictionary while iterating over it. Doing so will produce the error:
RuntimeError: dictionary changed size during iteration .
- For Q11a, the solution does not adhere to typical SQL variant behavior because we include columns in the
SELECT statement that aren't in GROUP BY or in an aggregation. In other words, it doesn't really make sense to select the staff member's name, because multiple staff members have the same food order (for example, Angela, Jessica, and Rebecca all have a food_order value of 'rice' ). In many SQL variants such as Postgres, a query like the one in the staff solution would cause an error. However, SQLite will not error.
- For Q11b, the
JOIN predicate should say staff.food_order = players.food_order AND staff.fav_player = players.name .
|
Summer 2023 | N/A | N/A | N/A | N/A |
Spring 2023 | Michael Ball |
|
| For the midterm:
Thanks CSM for the walkthroughs! Please note some typos in the exam and/or walkthrough videos below:
- Q10a:
curr_field and bool(curr_field) are both acceptable answers
- Q10c: The correct answers are
curr_field[0] == 'cobble' and 'cobble' in curr_field
- Q11c: In the problem description, it should say
self.seal_compliments instead of self.compliments
For the final:
Thanks CSM for the walkthroughs! Please note some typos in the exam and/or walkthrough videos below:
- For Q2c, none of the answer options are correct. The correct answer is -1.
- For Q7a, the last line of the doctests should say
{0.0: 0.2, 10.0: 0.4, 70.0: 0.2, 90.0: 0.2}
- For Q12c, it should say
return 4 * squared_experience(n // 2) .
|
Fall 2022 | Michael Ball |
|
| For the midterm: Thanks CSM for the walkthroughs! Please note some typos in the exam and/or walkthrough videos below:
- Q4b: On the blank exam PDF, please ignore the text after Explanation - that was supposed to
only be included in the solution PDF.
For the final: Because of the strike this semester, this final is not representative of most final exams. |
Summer 2022 | N/A | N/A | N/A | N/A |
Spring 2022 | Michael Ball |
|
| For the midterm: Q7a is part of the Closet ADT, so you do not need to worry about abstraction barrier violations
For the final: Thanks CSM for the walkthroughs! |
Fall 2021 | Michael Ball |
|
| For the midterm: Thanks CSM for the walkthroughs!
For the final: Thanks CSM for the walkthroughs! |
Summer 2021 | N/A | N/A | N/A | N/A |
Spring 2021 | Michael Ball, Gerald Friedland |
|
| For the midterm: Thanks CSM for the walkthroughs! |
Fall 2020 | Michael Ball |
|
| N/A |
Summer 2020 | N/A | N/A | N/A | N/A |
Spring 2020 | Michael Ball |
|
| For the final: Formatting may be off since the PDF was generated by examtool. |
Fall 2019 | Michael Ball |
|
| For the midterm:
Please note some typos in the exam and/or walkthrough videos below:
- Q1:
fun(max, 61, 88) evaluates to 61. The correct calls to alt_fib(6) is 25 not 26.
- Q7: The solution for the iterative version of
flatten_list has a typo.
Instead of result.append(item) it should say result.append(num) .
For the final:
Please note some typos in the exam and/or walkthrough videos below:
- Q1 video walkthrough:
they(cant(stop, all(of, us))) should error, not print SASUKEEE twice.
- Q5 solutions: last line,
helper(n // 10, n % 10) should be helper(num // 10, num % 10) .
-
Q5 video walkthrough: At 5:10, the correct answer is not
elif num % 10 <= prev ,
it should be if prev > n % 10 (which matches the solution PDF).
-
Q7: The doctests at the beginning of the question should say "Yum, I ate 3 pieces of chocolate"
instead of "Yum, I ate 3 pieces of milk chocolate", and "Oh no! There is no more chocolate"
instead of "Oh no! There is no more milk chocolate".
|
Spring 2019 | Gerald Friedland |
|
| N/A |
Fall 2018 | David Culler |
|
| N/A |
Spring 2018 | Gerald Friedland |
|
| N/A |
Fall 2017 | N/A | N/A | N/A | N/A |
Spring 2017 | N/A | N/A | N/A | N/A |
Fall 2016 | N/A | N/A | N/A | N/A |
Spring 2016 | David Culler |
|
| N/A |
Fall 2015 | N/A | N/A | N/A | N/A |
Summer 2015 | N/A | N/A | N/A | N/A |
Spring 2015 | N/A | N/A | N/A | N/A |
Fall 2014 | N/A | N/A | N/A | N/A |