Final Exam

Info

The Final exam will be on Thursday, 16th Feb 2023 at 2:30pm to 4:20pm. Be on time! We will aim to start promptly at 2:35pm in order to give as much time as possible to complete the exam. No matter when you arrive, we will “call time” (pencils down, exam is done) at exactly 4:20pm. As such, if you arrive late, you get less time!

What to bring

  • Yourself.
  • Your UW ID card (we will check these!).
  • A pen or pencil and eraser.
  • Water
  • A 1-page cheatsheet
    • Note: we will provide a reference sheet that includes some documentation that you won’t have to memorize or include on your own cheatsheet.
    • Note 2: This reference sheet may change between now and the exam date.

Where to sit

Seating in the room will be done by section. Please refer to this slide for where to sit, including the location of left-handed desks.

Format

This is a hand-written test, meaning NO ELECTRONIC DEVICES of any kind allowed. Any math on the exam will be limited to simple arithmetic; we’re assessing for Python and programming, not for math!

Question types may include some of the following. Note: this is not an exhaustive list, nor will all of these formats appear. This list is meant to give you an idea of what might possibly appear on the exam.

  • Given a program, function, or code snippet and possible inputs, what is the output?
  • What is the value of variables X, Y, Z on line N?
  • Fill in the code: Replace the blanks on line N with an appropriate statement or expression
  • Evaluate expressions
  • Write a function that takes … and returns …

Topics

Every topic covered in the quarter is fair game for appearing on the exam.

The short list of topics are:

  • Variables, Statements, Expressions
  • For loops, range, nested loops
  • If statements and conditionals
  • Functions, function arguments, and return statements
  • Lists and nested lists
  • File input/output (I/O)
  • Dictionaries
  • Sets
  • Graphs
  • Sorting
  • Testing
  • Basic Classes

Practice

Warning

This quarter marks the first quarter in recent past that the course is doing in-person exams. As such, exams from past quarters are either completely different, or contain possibly outdated practices. When in doubt about whether a topic will be covered or if an answer key seems different than you expect, ask on Ed.

Notes and Caveats

For all past Final exams, the following caveats apply:

  • Our 23wi exam assumes Python 3.7+.
    • As such ALL print statements should have (). E.g., print() or print("Hello")
    • Division (/) always does float division. E.g., 1 / 2 evaluates to 0.5. (In past Python versions, it would have been 0. That is no longer the case.)
  • We will not ask you to “draw the environment”.
  • Many of these refer to “stack frames.” These are similar to the “Frames” in PythonTutor, but since we haven’t explicitly covered this term, we won’t ask about it on the 23wi exam.

Practice Exams

  • 15sp Final (and its answer key)
    • Relevant problems are 2, 3, 4, 5, 6 (6a solution assumes truncated division, but Python 3.7 automatically does floating point division)
  • 16wi Final (and its answer key)
    • Relevant problems: 1, 2, 3, 4, 5 (5b uses old print), 6, 7a
  • 17wi Final (and its answer key)
    • Relevant problems: 1, 2, 4, 5 (incorrect print 5c), 6 (6a incorrect print), 7a
    • 3 - incorrect print, division is truncated. Correct answer = sum: 14.4
  • 18sp Final (and its answer key)
    • Note old non-parentheses print statements