Lecture 13 - Midterm Practice Problems
Today's Goals
- Work through realistic practice problems similar to the midterm
- Practice applying multiple concepts together
- Walk through solutions step-by-step
Today's Format:
- Work individually first, then discuss with neighbors
- I'll walk through solutions after you've tried each section
- Ask questions anytime - if you're confused, others probably are too!
Exam tips
Exam format
- Short answer, fill-in, find bugs ~ 60% of the exam
- One hand-coding problem ~ 40% of the exam
Short answer tips
- I was serious about Anki / flashcards - they help!
- When approaching a block of code (to debug, find what it returns, fill in blanks):
- Skim it quickly once to get the gist
- Then read it slowly making sure you understand each part completely
- Write what you know - if you don't know the answer, what DO you know?
Hand-coding tips
- Read the whole problem first and make a plan
- Test your logic by imagining runs with example data
- Show your process (you can write comments by hand too!) - if I can see what you were trying to do I can give you more credit
- Check your function signature - parameter and return types should match!
- Check your syntax! - semicolons,
=vs==,..vs..=, ... did I mention semicolons?
See Activity 13
for the material for the rest of the lecture
First-half Discussion
Let's go through the solutions for Practice Set A together before moving to the longer problem.
Second-half Discussion
If you're finished and want to try out your solution, type it up and email it to laurenbw@bu.edu
I'll put it on the screen (anonymously) and we'll discuss it / debug it together
Questions?
What would help clarify anything before the midterm?