Final Exam
Info
The Final Exam has been released, and the answer key can be found here.
Info
The Final exam will be on Tuesday, 12th Mar 2024 at 4:30pm to 6:20pm in the lecture hall (GUG 220). Be on time! We will aim to start promptly at 4: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 chart is here. Please find your name and then compare to the schematic for the room.. Note: * The middle section starts with number 101 on the right (from the seat’s perspective). * The right side (from the seat’s perspective) is the single digit even numbers. * The left side (from the seat’s perspective) is the single digit odd numbers. * There is no row I (it skips from H to J).
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 and nested dictionaries
- Sets
- Graphs
- Sorting
- Testing and debugging
- Basic Classes
Practice¶
Warning
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 24wi exam assumes Python 3.10+.
- As such ALL print statements should have (). E.g.,
print()
orprint("Hello")
- Division (
/
) always does float division. E.g.,1 / 2
evaluates to0.5
. (In past Python versions, it would have been0
. That is no longer the case.)
- As such ALL print statements should have (). E.g.,
- We will not ask you to “draw the environment”.
- Many past exams 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 24wi exam.
Practice Exams¶
Here is a practice exam:
- Practice Exam (and its answer key)
These past quarters’ midterms may be helpful in practice and studying:
- 23au Final (and its answer key)
- 23sp Final (and its answer key)
- 23wi Final (and its answer key)
- 18sp Final (and its answer key)
- Note old non-parentheses print statements
- 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
- 16wi Final (and its answer key)
- Relevant problems: 1, 2, 3, 4, 5 (5b uses old print), 6, 7a
- 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)