Python / Foundations
Python β Foundations
Build and trace small programs with explicit values, control flow, functions, collections, and files.
What you will learn
- Build and trace small programs with explicit values, control flow, functions, collections, and files.
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 learningValues, types, and expressions
Choose representations that preserve meaning, perform deliberate conversions, and reason about arithmetic and truth without confusing text with numbers.
Start learningDecisions, 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 learningFunctions, contracts, and scope
Turn repeated calculations into small functions whose inputs, results, and failure conditions are explicit.
Start learningCollections and Unicode text
Choose collections by access pattern, understand aliasing and copying, and process text without losing its meaning.
Start learningFiles and structured data
Read and write text deliberately, manage resources, and separate storage formats from validation of their contents.
Start learning