Back to the Introduction to Computer Science outline The Course Maker
Introduction to Computer Science outline
Week 16 · Study guide

Week 16 — Final Study Guide (Cumulative, Weeks 1–15)

Introduction to Computer Science · CSCI 1101 Fall 2026 · Prof. Okafor Fictional sample

Course: Introduction to Computer Science — CS1 / Programming Fundamentals in Python (CSCI 1101) · Silver Oak University (fictional sample) · Prof. Okafor
Use this with: the Review Deck (E), the Exam-Prep Tutorial (N), and the Practice Final (O). The Final covers all 8 objectives.

For every fact below: if there's code, predict the output, then run it. The Final is mostly predict-the-output and debugging.


Coverage (and the point split)

Objective Topic ~Items
1 Computing, print, errors 3
2 Variables, types, expressions, I/O, strings 4
3 Booleans & conditionals 3
4 while & for loops 3
5 Functions 3
6 Lists, tuples, dicts, sets 3
7 Strings, files & exceptions 3
8 Algorithms, recursion & OOP 3

Objectives 1–2 — Basics, variables, expressions, strings

  • Precedence (*,/,//,% before +,-): 3 + 4 * 211. SyntaxError vs NameError.
  • / → float (8 / 42.0); // floors; % remainder (13 % 41). int("7")+310; "3"+"4"34.
  • input() → string. Slicing exclusive stop: "COMPUTER"[0:4]COMP. f-strings insert values.

Objective 3 — Booleans & conditionals

  • and/or/not; not (5 < 3)True. if/elif/else runs the first true branch. = assigns, == compares.

Objective 4 — Loops

  • while needs a counter update. range stop is exclusive: list(range(2, 8, 2))[2, 4, 6]. for accumulator range(1,5)10. Nested loops multiply.

Objective 5 — Functions

  • def f(a, b): return a + b. No returnNone. Local variables don't exist outside the function (NameError).

Objective 6 — Collections

  • Lists are mutable; .append() adds to the end. Aliasing: b = a points at the SAME list (a = [1,2]; b = a; b.append(3)a is [1, 2, 3]). Dicts: d[key] lookup; missing key → KeyError. Sets dedup (len({1,2,2,3,3,3})3). Tuples are immutable (TypeError).

Objective 7 — Strings, files & exceptions

  • String methods return NEW strings (immutable): "hello".upper()HELLO. .split(",") → list. with open(...) for files; try/except. int("x")ValueError; missing key → KeyError; missing file → FileNotFoundError.

Objective 8 — Algorithms, recursion & OOP

  • Big-O: linear O(n), binary O(log n) (needs sorted), selection sort O(n²). Recursion: base case + recursive case; fact(4)24; no base case → RecursionError. OOP: class, __init__, self.attr, methods; Dog('Rex').speak()Rex barks; forgetting self.AttributeError.

The classic-bug checklist (memorize)

= vs == · exclusive range stop · / → float (5.0) · "2"+"3" is "23" · no returnNone · list aliasing (b = a) · missing self.AttributeError · binary search needs sorted · every recursion needs a base case · input() returns a string.

Self-check (✓ when you can do it without notes)

  • [ ] Predict outputs across precedence, slicing, loops, and functions.
  • [ ] Predict a list-aliasing result and a dict/set result.
  • [ ] Trace a try/except (which block runs).
  • [ ] Predict a recursive call's output and a class method's output.
  • [ ] Name the Big-O of linear search, binary search, and selection sort.
  • [ ] Take the Practice Final (O) and score yourself.

~ Prof. Okafor's edition · Fall 2026 · built with thecoursemaker.com