dc dotCreds
Reference guide

Python Institute PCAP Course Notes

Study Python Institute PCAP section notes, then jump straight into the guided course or related practice questions without losing your place.

Continue CourseStart PracticePDF downloads available in Pro.
Checking access

Checking Pro access...

Looking for your active Pro access before showing Course Notes. This usually takes just a moment.

Course Notes preview

Unlock Pro for the full per-exam reference guide.

Preview one piece from each section. Pro includes every Course Notes section, summary, key point, common mistake, exam tip, related-question review, and PDF export.

Includes full Course Mode and Course Notes.

Section 11. Modules and Packages (12%)Preview
More in this section
  • 16 more key points in Pro version
  • 7 more common mistakes in Pro version
  • 3 more exam tips in Pro version
  • 21 more related questions in Pro version

Summary

Know exactly what an import binds, how Python resolves module names, and the PCAP-specific standard-library calls in `math`, `random`, and `platform`. Be able to reason about `__name__`, `__all__`, leading underscores, `__pycache__`, conventional packages, and search-path shadowing.

Key Points

  • `import module` binds the module; `from module import name` binds the imported object directly.

Common Mistakes

  • Treating `ceil()` as 'away from zero' for negative numbers.

Exam Tips

  • For imports, write down the exact name that appears in the current namespace.
Section 22. Exceptions (14%)Preview
More in this section
  • 12 more key points in Pro version
  • 7 more common mistakes in Pro version
  • 3 more exam tips in Pro version
  • 25 more related questions in Pro version

Summary

Trace exception flow precisely. Know handler order and hierarchy, `as exc`, grouped handlers, `.args`, `else`, `finally`, explicit and bare `raise`, `raise ... from ...`, assertions, and custom exception inheritance.

Key Points

  • Python scans `except` clauses top-to-bottom and executes the first compatible handler.

Common Mistakes

  • Putting a broad base-class handler before a specific subclass handler.

Exam Tips

  • Before tracing, identify the exact exception class raised.
Section 33. Strings (18%)Preview
More in this section
  • 16 more key points in Pro version
  • 7 more common mistakes in Pro version
  • 3 more exam tips in Pro version
  • 33 more related questions in Pro version

Summary

Master the distinction between characters, Unicode code points, and encoded bytes; then trace Python string operations and method return behavior exactly. Most misses come from immutability, slice boundaries, `ord`/`chr`, classification methods, and `find` versus `index`.

Key Points

  • Unicode assigns characters code points; an encoding maps code points to bytes.

Common Mistakes

  • Treating code points and UTF-8 bytes as the same thing.

Exam Tips

  • Track both value and type when encoding, decoding, sorting, or calling `ord`/`chr`.
Section 44. Object-Oriented Programming (34%)Preview
More in this section
  • 21 more key points in Pro version
  • 11 more common mistakes in Pro version
  • 4 more exam tips in Pro version
  • 65 more related questions in Pro version

Summary

This is the largest PCAP domain. Trace Python's object model: instance versus class state, attribute lookup, methods and binding, introspection, inheritance/MRO/polymorphism, identity, constructors, and initialization. Expect many short code-tracing questions.

Key Points

  • A class defines behavior/state conventions; an object is an instance of that class.

Common Mistakes

  • Assuming changing one instance attribute changes the class attribute.

Exam Tips

  • For every attribute expression, ask: instance dictionary first, then class/inheritance lookup?
Section 55. Miscellaneous - Comprehensions, Lambdas, Closures, and I/O (22%)Preview
More in this section
  • 22 more key points in Pro version
  • 9 more common mistakes in Pro version
  • 4 more exam tips in Pro version
  • 41 more related questions in Pro version

Summary

Trace compact Python constructs accurately: list comprehensions, lambdas, `map`/`filter`, closures, and file I/O. Know iterator behavior, closure binding/state, stream terminology, text-versus-binary types, file modes, stream position, and mutable `bytearray`.

Key Points

  • A list comprehension evaluates an expression for each selected item and returns a new list.

Common Mistakes

  • Confusing a comprehension filter with a conditional expression.

Exam Tips

  • When confused by a comprehension, rewrite it as ordinary nested `for` statements.