Try   HackMD

CS0111 - Fall 2022: Midterm Prep Guide

When: a single 90-minute period of your choosing between Tuesday 10/25 and Friday 10/28.
Where: In Gradescope

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 review and practice with tables (the Oct 7th lecture). It will not include lists.

What should you expect?

  • The exam will be designed to take roughly 60 minutes, but you'll get 90 minutes (those with SAS accommodations will get their approved time adjustments on top of the 90 minutes). You can do the exam in any single 90 minute period while the exam is available.

  • Types of questions:

    • There will be a mix of fill-in-the-blank questions, sketch code questions, and open-ended/free-response questions.
    • You may be asked to draw or write something on paper (or tablet) and upload a photo or PDF or scan of your work.
    • You may be asked to record and upload a brief (under 2 minute) video of yourself explaining an answer to a question (you could do this using zoom, your phone, etc).
  • The exam will be self-contained. You will not be asked to remember any specific problem or scenario from lecture, homework, projects, or labs.

  • The exam is open notes, but you cannot search for general information online. You may look at any notes (written or code) that you've taken as part of lecture, the textbook, or any study/summary guide that you prepared prior to the exam.

    • You may work with classmates while preparing your study guide, but everyone must prepare their own guide. Study guides may not be shared once the exam has been opened.
    • Communicating information about exam contents to other students (in any way, including via notes added to study guide files, e-mail, etc) will be a violation of the course academic honesty policy. Collaboration after the exam opens will be referred to the academic code committee with a recommendation to NC the course.
  • 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.

  • Partial credit will be available on all 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 lam 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 lam 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 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 in-class exercises. The midterm is not designed to trick you. It merely aims to check that you've understood the course concepts beyond just getting code to run with the help of TAs.

How Should We Prepare?

Review the drills (which are now re-opened for practice you won't get back old drill points now, but you can use them for studying whether or not you took them by the original deadlines).

Try last year's midterm which is available to you as a Gradescope assignment (no, this will not be graded).

  • Fall 2021 midterm (set up for you to try in Gradescope. Ignore the due date the "late" deadline is just a way to let us make the answers available immediately.)
  • For those who can't see the explanations that we built into Gradescope, here's a doc that shows what you should have been seeing
  • Here's the recording of the zoom review session. We worked through the fall 2021 midterm (recording starts from question 3).

Try the following sample questions from past 111 quizzes; these questions are somewhat more programming-heavy than the questions on the midterm will be, but they should still be useful for studying.