Time: 2 Hours
The exam is closed note, except for:
- A 1-page (front and back) hand written sheet of notes that you create yourself (it may not be shared).
- The Midterm 1 Study Guide. A copy of this study guide will be provided with your exam.
The exam will cover all course topics through Chapter 1.7 of Composing Programs, except for Newton's method (1.6.5) and decorators (1.6.9). Those topics include:
- Primitive expressions
- Call expressions
- Import statements
- Expression trees
- Assignment statements
- Pure and non-pure functions
- Def statements and user-defined functions
- Applying user-defined functions
- Environment diagrams
- Arithmetic operators
- Local assignment
- Conditional statements
- Boolean contexts
- Boolean operators
- Iteration with while statements
- Passing functions as arguments
- Nested def statements
- Functions as returned values
- Lambda expressions
- Recursive functions
- Mutual recursion
- Tree recursion
Particular emphasis will be given to user-defined functions, assignment, iteration, higher-order functions, and environment diagrams.
You should be prepared to answer questions that relate closely to the projects and homework assignments (not including challenge problems). You should also know how to draw an environment diagram by hand.