Try   HackMD

CS0111 - Spring 2025: Mid-Semester Quiz Prep Guide

When: Wednesday, March 19, 2pm-2:50pm, Salomon 001. Those with SAS accommodations and with S02 time conflicts will be contacted.

The goal of the quiz is to check your conceptual understanding of working with functions, conditionals, named expressions, tables, and lists. 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 lists (Mar 5 lecture). It will not include datatypes, trees, or reactors.

After Drill 16 (due 3/10), there will be no drills out until 3/31, to give you time to prepare for and take the quiz.

What should you expect?

  • You will complete the quiz in person, on paper. The quiz will be designed to take 20-25 minutes, but you'll get 50 minutes (those with SEAS/SAS accommodations will get their approved time adjustments on top of the 50 minutes).

  • The quiz 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 quiz.

    • 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 might be asked to write short where-examples for a function we give you
  • 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.

  • There will be a mix of fill-in-the-blank questions, multiple-choice/checkbox questions, outline steps questions, and open-ended/free-response questions.

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

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?
  • How data is passed around in a program: what is a valid input to a function with a specific intype annotation, how the output of one function can be used as the input to another function.

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

Lists

  • The behaviors of the list operations (filter, map, distinct, remove, member, length, M.sum, get) and how to choose list operation(s) for a specific task
  • How we write recursive functions and reason about them using execution diagrams

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 will NOT be tested on

  • 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 "
  • Reactors
  • raise
  • Datatypes
  • Trees

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, 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 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)
  • Given a set of recursion examples of the style we've been writing in class, write an expression to describe the computation in terms of the first element and recursive call on the rest of the list
  • Given the body of a recursive function, fill in an execution diagram to show how a specific answer gets computed

Note that these are kinds of questions you've done across homeworks, labs, and drills. Reviewing your work on these might be good ways to prepare for the exam.

Collaboration Policy

No collaboration is permitted. This includes no sharing of notes files. Your work on the quiz must be entirely your own.

How to Prepare?

We've created a separate Gradescope (entry code on Ed) that has the three most recent quizzes, assorted questions from previous quizzes, and the past drills (in case you missed them). Prior to fall 2024, the quizzes were designed to take longer. The fall 2024 quiz is not found on Gradescope because it was a paper exam you can find it and its solutions as PDF files on Canvas). It gives an indication of the length of exam to expect.

We suggest working through the practice quizzes in good faith (as if you were taking the exam), and then grading yourself based on the answer key and using that as a diagnostic of which topics to revisit in the textbook, drills, your notes, or lecture capture. Keep in mind that the rubrics we used to grade the past exams allowed for partial credit for demonstrating knowledge of course materials. If you want to double-check your reasoning for a practice exam question, please make a public post on Gradescope (so that others can benefit from the answer as well).

Note that nothing you turn in in the separate Gradescope will count towards your grade.