title: Final Exam Prep Guide (Fall 2020)
tags: Documentation, 2020
# CS0111 - Fall 2020: Final Exam Prep Guide
Roughly, we want to check whether you can frame data-facing questions at a high level, use code to compute answers to questions, effectively organize data for a problem, and test or sanity check programs and their results. We also want to check whether you understand how the code constructs we used this semester work, and when to use those constructs.
## What should you expect?
- The exam will be designed to take roughly 60 minutes, but you'll get 90 in Canvas.
- The exam will be self-contained. You will not be asked to remember any specific problem from lecture, homework, projects, or labs.
- 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 might need to write a dataclass or Pyret datatype definition
- You will not be tested or graded on details of syntax. For example, if we ask you to write a Python for-loop and you forget the colon at the end of the first line, that's fine. For the exam, we care about your understanding of the concepts. As long as your code is close enough to convey that you know how to approach the problem, that's fine.
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.
- At least some questions will be open-ended rather than typical Canvas-style drill questions.
## What you are expected to know
- Which programming constructs are appropriate for different situations: when should you use each of conditionals, (helper) functions, recursion, for-loops, variable updates, and field updates?
- What results a program produces (this includes understanding how recursion and return statements work)
- How the program directory and memory evolve as a program runs
- What each of map, filter, and sort would achieve on a list
- How to clean a dataset, such as standardizing capitalization or checking whether all values are in a fixed list of values (like known discount codes) or a fixed range (numbers)
### Data structures
- When are each of tables, lists, trees, dataclasses, and dictionaries a good choice for capturing information.
- How to use a combination of tables, lists, trees, dataclasses, and dictionaries to manage the information for a problem.
- How to define a Pyret datatype or Python dataclass to capture specific information for a problem.
- How to test functions that return results
- How to test functions that update data, but don't return values (other than None)
- How to test a program that's designed to process a large dataset
## What you are NOT expected to know
*This list may grow as people ask clarifying questions about the exam*
- Fine-grained details of language syntax
- The specific names of operations on Pyret tables or Pyret operations that produce different kinds of graphs
- Reading input from or writing output to files
## What kinds of problems might you get?
See the past exams for sample questions. This list is not exhaustive
- Given a program, what will its output be when executed?
- Given a scenario, what data structures would you use to capture the data? Answers should indicate both the datatype (list, dictionary, tree, etc) and the types of the parts (list elements, dictionary keys, etc).
- Given a partially-written program with blanks, how do you fill in the blanks to achieve a certain behavior or result?
- Given a program, what might the program dictionary and memory look like at a specific point in the execution?
- Given a problem, what would be some good tests for it?
- Given a program that is producing the wrong answer, identify and correct the error.
- Given two proposed data structures for a specific problem, contrast their strengths and weaknesses.
- Given a table of data, roughly what steps would you take to prepare it for use
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?
We are giving you the final exams that were previously given in the course as a study guide. This year is the first time that we gave a midterm in 111, so the old exams covered the entire semester. Your final will focus on material since the midterm (but some older material might still come up as part of a problem).
In addition, your final will be designed to be given in Gradescope, while some of the older exams were given on paper. That will necessarily change how we ask some questions.
The exams and those solutions that we have so far are in a [folder called "Previous Finals" in the "Files" area of our Canvas site](https://canvas.brown.edu/courses/1082984/files/folder/Previous%20Finals). These include:
- Kathi's final from 2018 -- this was a 3-hour final, done on paper
- Doug's final from 2019
- Kathi's final from spring 2020 -- this is similar length to what your exam will be; students entered their answers in Gradescope
Workshops after break will provide a chance to review questions and concepts with the TAs.