---
# System prepended metadata

title: 'CS0111 - Fall 2025: Final Exam Prep Guide'

---

# CS0111 - Fall 2025: Final Exam Prep Guide

Our final will be on **Thursday, December 18 9am - 12pm**. 

- List Art Center 120
- Students with SAS accommodations: 9am, onward location will be emailed

The exam is going to check your conceptual understanding of material from across the course, with emphasis on the material from lists onward, including organization and updating data. We want to check whether you can frame data-facing questions at a high level, choose between the shapes of data for a problem, and design and test programs that change data. 

## What should you expect?

- The exam will be entirely on paper. You may not use a computer (or phone or any other electronic device, etc) during the exam.

- The exam will be designed to take an average of about 90 minutes (but you have three hours). That should give enough time for everyone to finish.

- The exam will be self-contained. You will not be asked to remember any specific scenario 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-style datatype definition
    - You might be asked to write assertions/short test expressions

- If a question involves code, it will be presented in whichever of Python or Pyret we used when we learned the corresponding concept in the course. **The question will clearly say if you are expected to be using Python or Pyret.** The majority of questions will use Python, unless the concepts for that question are more clearly stated in Pyret.
 
- 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. 

   :::warning
   There are some syntactic details that we **do** care about, because they convey understanding of how code executes:
   
   - Using reasonable indentation (such as indenting the code to execute when a conditional statement is true) is important because it indicates what code gets executed when
   - Using the correct operators to access "pieces" of data (`my_list[0]` for a list, `my_dict["key"]` for a dictionary, `my_data.my_field` for a datatype, etc.) is important because it indicates an understanding of the data structures and, for more complex expressions, how code executes. For example, if `data_list` is a list whose elements are datatypes with a field `name`, we would expect you to write `data_list[0].name` to access the name of the first item in a list (as opposed to `data_list.name[0]`, `data_list[0][name]`, etc.)
   :::
   
- The questions will mostly be open-ended rather than multiple choice. You might be asked to draw something, fill in blanks, circle relevant pieces of code, and so on.

## What can/should you bring?

- Your Brown ID (we will check them as you turn in your exam)
- Something to write with (two colors would be helpful)
- One sheet of paper (8.5 x 11) with notes of your choosing. You may have notes on both sides. You may not share notes with others during the exam, but you are welcome to work with others to prepare your study sheets. The sample exams (see below) might help you figure out what notes you want to bring. 

Your notes sheet must be on paper, not on your phone or computer, etc. You are free to use a computer to type up your note sheet, but what you bring to the exam must be printed out on a physical piece of lpaper.

We will provide scrap paper. 

No headphones or earbuds during the exam.
   
## What you are expected to know

The exam will cover content up through lecture on 12/1. The last two lectures are not covered. The lecture from  11/24 (on programming languages) is also not covered.

### Programming

- Which programming constructs are appropriate for different situations: when should you use each of conditionals, (helper) functions, recursion, for-loops, and variable updates?

- How programs evaluate to answers, both in terms of the answers, and at the level of the program directory and memory diagrams.

- What each of map, filter, and sort would achieve on a list

- How data would change in memory based on updates to variables and pieces of dataclasses, dictionaries, etc.

### Data structures

- When are each of tables, lists, trees, dataclasses, and dictionaries a good choice for capturing information. (For purposes of the exam, we will consider Pyret tables and Pandas DataFrames to be the same data structure, with the exceptions of the caveats described in the "Languages" section below)

- How to use a combination of tables, lists, trees, dataclasses, and dictionaries to manage the data for a problem.

- How to define a Pyret datatype or Python dataclass to capture specific information for a problem.

### Testing

- How to test functions that return results

- How to test functions that update data, but may or may not return anything


### Languages

- How we might adapt code written in Pyret to code written in Python and vice versa

- Advantages of using a type/operation that is only available in one language vs. the other (for CS111, this would be: datatype definitions with variants in Pyret; for-loops and dictionaries in Python)

- What the consequences are of allowing/disallowing mutation in a programming language, such as when we have to write a function that produces new data vs. when we can write a function that mutates input data

- In broad strokes, how table operations differ between Pyret tables and pandas dataframes: the notion of row labels in pandas and why pandas has both `loc` and `iloc` vs. just `row-n` in Pyret; the way we can transform subsets of cells in pandas using `.loc[row_selector, column]`.

## 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 (except for the caveats given in the yellow box on syntax earlier in this page)
- The specific names of built-in functions (but for common built-in functions we used in class, such as table operations, you should have a general sense of what the function does)
- Operations that produce plots and charts
- Reading input from or writing output to files
- Reactors or the various components needed to write a simulation or game in Pyret
- Details for using the built-in sort operations in either Pyret or Python
- Computing runtime or machine learning (last two lectures) or compilers (11/24 lecture)

## What kinds of problems might you get?

- 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 and values, 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 directory and heap 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 organizations/data structures for a specific problem, contrast their strengths and weaknesses. 

Note that these are the same kinds of questions you've done across homeworks, labs, drills, and quizzes.

## How To Prepare?

Milda will hold some office hours late reading period/early exam period where you can ask questions about and review your work on these problems. You also have the following resources:

- A [folder in Canvas](https://canvas.brown.edu/courses/1100572/files/folder/Practice%20exams) with the exams from some of the past offerings of the course. All of the final exams were in-person and timed for 3 hours.
- The [separate Gradescope](https://www.gradescope.com/courses/1142538) that you used to prepare for the quiz still has questions from previous quizzes, and the past drills from this semester (in case you missed them). Note that nothing you turn in in this separate Gradescope will count towards your grade. Drill 22 is not included because it was just a check-in for questions, and Drill 23 is not included because Drill 29 replicates it. Drill 30 is included in case you want to review it, but runtime *is not* covered on the final.