---
title: Midterm Exam Prep Guide, Fall 2021
tags: Documentation, 2020
---
# CS0111 - Fall 2020: Midterm Prep Guide
The goal of the midterm is to check your **conceptual** understanding of working with functions, conditionals, named expressions, and tables. We want to see whether you understand how these constructs work and when to use them. We also want to see whether you can plan an analysis based on tabular data.
This is not primarily a coding exam.
*The exam will cover the material up through data cleaning (the Oct 7th lecture). It will not include lists.*
## What should you expect?
- You will complete the exam in Gradescope. The exam will be designed to take roughly 60 minutes, but you'll get 90 minutes (those with SEAS/SAS accommodations will get their approved time adjustments on top of the 90 minutes).
- The exam will be self-contained. You will not be asked to remember any specific problem or scenario from lecture, homework, projects, or labs.
- You will not need to have memorized library functions or complicated syntax. If you have been writing your own homework solutions (as the collaboration policy expects), you should have all the coding knowledge you need to do fine on the exam.
- You will not be expected to write much code on the exam.
- You may be asked to fill in fragments of code (along the lines of what you've done on the drills).
- You may be asked to provide the names and input/output types of functions that you would need in solving a problem.
- You will not be tested or graded on details of syntax. For example, if we ask you to write an if-expression and you forget the colon after the question, that's fine. The exam focuses on concepts. We'd be looking for your code to be close enough to convey that you know how to approach a given problem.
Using reasonable indentation (such as indenting the code to execute when a conditional statement is true) will be important though, as that conveys which code gets executed when.
- There will be a mix of fill-in-the-blank questions, sketch code questions, and open-ended/free-response questions.
## What you are expected to know
### Programming
- Which programming constructs are appropriate for different situations: when should you use each of conditionals, (helper) functions, named values, and different table operators?
- How does the program directory evolve as a program with functions and conditionals evaluates.
- Nested helper functions: when to create them and how/where you can use them.
### Tables
- Which operations to use to prepare a table for a given data analysis
- What sorts of errors to look for in a table
- When you can/cannot use programming to identify or correct errors in tabular data
- How your submission for the course project handled the table-based analysis
### Writing Examples
- Creating a diverse set of examples for a given function
- Evaluating whether a given set of examples is good for illustrating a given function
## What you are NOT expected to know
- Fine-grained details of language syntax
- The specific names of built-in Pyret functions (we expect you to recognize those we have used frequently in class, but not to recall them for yourself)
- e.g., If we reference `build-column`, you should know that it adds a column to a table, but we won't ask you "what is the name of the table function that ..."
- How lambda works (or how to use it)
- You do need to understand how nested helper functions work, but you will NOT need to explain or write lambda expressions. You are welcome to use them if you are comfortable with them.
- Anything about lists
## What kinds of problems might you get?
*This is not exhaustive, but it should give you a good idea of what to expect*
- Given a program, what will its output be when executed?
- Given a program, what will be in the program directory at a specific point in the program's execution?
- Given a partially-written program with blanks, how do you fill in the blanks to achieve a certain behavior or result?
- Given a problem, what would be some good examples for it?
- Given a problem and a set of examples, identify valuable examples that are missing.
- Given a program with a nested function, discuss whether the nested function can be moved outside of its outer function.
- Given a program, identify which helper functions or local names would clean up the code
- Given a program that is producing the wrong answer, identify and correct the error.
- Given two proposed tables for a specific problem, contrast their strengths and weaknesses.
- Given the description of an external dataset (e.g., in a Google Sheet), what would you do to clean and prepare the data for answering a given question?
- Given a table of data, roughly what operations would you use to process it (i.e., what combination of filtering, sorting, computing new columns, etc would let you solve a problem)
Note that these are kinds of questions you've done across homeworks, labs, drills, and quizzes. Reviewing your work on these might be good ways to prepare for the exam.
## How Should We Prepare?
Review the drills. Get together with your lecture groups or project partners to talk through the kinds of questions you might get and what you need to know for them.
We don't have a sample midterm to hand out because 111 hasn't had a midterm in this format before. We do have some sample questions from past quizzes; these questions are somewhat more programming-heavy than the questions on the midterm will be, but they should still be useful for studying.
[Sample questions](http://cs.brown.edu/courses/csci0111/fall2020/samplequiz.pdf)
[Answer key](http://cs.brown.edu/courses/csci0111/fall2020/samplequiz-answers.pdf)