Python / Foundations

Python β€” Foundations

Build and trace small programs with explicit values, control flow, functions, collections, and files.

6 lessons Β· No account required

What you will learn

  • Build and trace small programs with explicit values, control flow, functions, collections, and files.
  1. Running Python and reasoning about a program

    A program is a reproducible sequence of instructions. Establish a reliable interpreter, separate the shell from Python, and trace names and output before learning larger constructions.

    Start learning
  2. Values, types, and expressions

    Choose representations that preserve meaning, perform deliberate conversions, and reason about arithmetic and truth without confusing text with numbers.

    Start learning
  3. Decisions, loops, and invariants

    Express rules as branches and repeated work as loops, then prove that each iteration makes progress and preserves a useful invariant.

    Start learning
  4. Functions, contracts, and scope

    Turn repeated calculations into small functions whose inputs, results, and failure conditions are explicit.

    Start learning
  5. Collections and Unicode text

    Choose collections by access pattern, understand aliasing and copying, and process text without losing its meaning.

    Start learning
  6. Files and structured data

    Read and write text deliberately, manage resources, and separate storage formats from validation of their contents.

    Start learning
Back to course