Final Exam
First page and last two pages of the exam.
Please check the official StG exam schedule.
Examples of past exams can be found on the UofT Libary's Exam page (you'll need a UTORID to get access to this site).
To help you see what we're looking for, here is the Fall 2010 final and the solution to the Fall 2010 final. We also have the solution to the Fall 2009 final.
Here's a really fun midterm.
Midterm 1
Test paper and solution.
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)
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. Nor will there be an object-oriented design question.
Old winter midterms
- 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
Midterm 2 covers everything we have done so far in lectures and labs and on the exercises, with a focus on everything since week 6, including A1. Redo any exercises and labs that you had trouble with!
- Binary trees
- BSTs
- Heaps
- Tree representation: nodes vs. a list
- Recursion: on trees, on lists, on numbers
- Sorting, especially heapsort, selection sort. The basic idea of mergesort and quicksort.
- Profiling: how does it help?
- Running time: how fast is an algorithm? Growth rate of functions. O() notation: describes the shape of an algorithm's running time, ignoring constant factors. What's the worst shape for a binary search tree? What's the best?
- Make sure you understand exceptions.
- Anything in the maze assignment is fair game.
Practice
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, 4, 5, 6, and 7 are good practice. Q4 is a profiling question.