Midterm 1
Midterm 1 covers everything we have done so far in lectures and labs and on the exercises. Redo the exercises and labs!
- Stacks, queues, and their implementations
- Classes:
__init__, self, creating instance variables - Exceptions, including
tryandexcept - Python modules and
import - Basics of
unittest - Basics of recursion (nothing much harder than
is_palindromefrom the lab) - The basics of doing an object-oriented analysis
Here are some old midterms. Please note that a lot of them have different content than this term. For example, you may see mention of trees; those are not on the test. You may also see mention of inheritance and superclasses; those are also not on the test.
Old midterms
- Winter 2012:
- Fall 2011's midterm 1 paper and solution.
- StG L0101 2009 winter midterm
- StG L5101 2009 winter midterm
- StG L0101 2008 winter midterm
- StG L5101 2008 winter midterm
Recursion practice
Here are some recursion problems for you to practice on.
Midterm 2
Winter 2012
Fall 2011's midterm 1 paper and solution. (You'll probably recognize one or two of the questions from the labs.)
Midterm 2 covers everything we have done so far in lectures and labs and on the exercises, with a focus on everything since the first test, including A1. (Although anything from the course is fair game.) Redo any exercises and labs that you had trouble with!
- Binary trees
- BSTs
- Heaps
- Heapsort
- Tree representation: nodes vs. a list
- Recursion: on trees, on lists, on numbers
Practice
Several of the tests from the Midterm 1 section have questions on trees and recursion.
Here's a really fun midterm.
These are good questions to do:
- Winter 2009 L0101, Q1, Q2
- Winter 2008 L0101, Q1, Q3, Q4
- Winter 2008 L5101, Q1, Q3, Q4
I've written up a discussion about how I often think about tree recursion, including a bit of practice.
Here is the winter 2010 exam. I don't have solutions written up, but you're encouraged to discuss yours on the boards. Questions 1, 5, 6, and 7 are good practice.