← Subjects

Python Crash Course

Python Crash Course

A from-scratch Python course, working through the fundamentals one chapter at a time — original code, activities, and interactive demos, following the structure of Python Crash Course, 2nd Edition (Eric Matthes). Chapters are logged here once they're actually done, not before.

CodeChapterStatus

C1

Getting Started

The Python interpreter, running a script vs. the interactive prompt, and reading a traceback.

Done

C3

Introducing Lists

Creating and indexing lists, modifying/adding/removing elements, sorting, and the IndexError mistake.

Done

C4

Working with Lists

for loops, range() and list comprehensions, slicing, copying lists correctly, and tuples.

Done

C5

if Statements

Conditional tests, and/or/in, if/else, if-elif-else chains, and if statements with lists.

Done

C6

Dictionaries

Key-value pairs, looping with items()/keys()/values(), membership checks, and nesting lists and dictionaries.

Done

C7

User Input and while Loops

input() and numeric conversion, while loops, flags/break/continue, and while loops with lists and dictionaries.

Done

C8

Functions

Defining functions, keyword arguments and defaults, return values, passing lists, and arbitrary arguments (*args/**kwargs).

Done

C9

Classes

Creating classes, default values and modifying attributes, inheritance, overriding methods, and instances as attributes.

Done

C10

Files and Exceptions

Reading and writing files, try/except/else, failing silently, and storing data with JSON.

Done

Also see the Python cheatsheet for quick reference.