Course overview
A practical introduction to Python 3 for first-time programmers. Learners progress from their first program to a tested command-line application through focused units, worked examples, guided practice, knowledge checks, and cumulative projects.
Who this is for
You are starting this subject and want a guided route from fundamentals to a finished project.
Prerequisites
No previous OSEKOO ACADEMY course is required. Use the optional diagnostic to confirm your starting point.
Syllabus
Each unit combines explanation, guided practice, a checkpoint, and practical evidence. Open a unit to review the exact sequence.
1. Getting Started with Python8 lessons
Prerequisites: No programming experience is required. You need a text editor and a local or preconfigured terminal that can expose a CPython 3.12 runtime, saved source, working directory, and process evidence. No IDE, package manager, Git, or administrator access is assumed.
Unit outcomes
- Distinguish saved source, editor state, shell command, interpreter, process, working directory, stdout, stderr, exit status, and traceback.
- Identify the exact CPython 3.12 runtime and source-directory relationship while producing privacy-safe shareable evidence.
- Create and execute one exact UTF-8 source artifact from a known clean directory against a predeclared process contract.
- Trace straight-line statements, simple expressions, name bindings, and ordered output without confusing assignment, equality, or persistence.
- Capture ordinary output, diagnostics, and completion status independently for accepted and controlled-refusal fixtures.
- Classify command, source-path, parse-time syntax, and runtime name failures and repair one evidence-backed cause at a time.
- Make a controlled source change with frozen differences and invariants, preserving useful comments and immutable attempt chronology.
- Build and defend the Pocket Library welcome-command evidence bundle without exposing sensitive data or claiming untested behavior.
Unit project
Build and defend a seven-artifact Pocket Library welcome-command bundle from a clean directory. Prove the CPython 3.12 runtime and source identity, exact five-line output, complete execution trace, syntax and name failure histories, controlled catalog-label promotion, privacy-safe evidence, and bounded claims. Earn at least 75/100 with no critical reproducibility, evidence-integrity, privacy, or scope failure.
Guided practice
- Label the saved-source, interpreter, process, stream, status, and expectation boundaries in a supplied run transcript.
- Generate a privacy-safe runtime record and compare source-parent and working-directory relationships in two synthetic directories.
- Create an exact three-line source artifact after declaring stdout, stderr, and status, then reject an added blank line.
- Trace Pocket Library names and integer addition statement by statement, including a failed right-side name resolution.
- Capture accepted and controlled-refusal process results and reject severe stdout wording that still returns zero.
- Repair an unterminated string and a use-before-binding error while preserving separate failing and passing attempts.
- Promote one synthetic label with a frozen one-line difference and reject an unpredicted collateral change.
- Complete and defend the seven-artifact Pocket Library studio under reproducibility, evidence-integrity, privacy, and scope gates.
Lesson sequence
- A Python Run Is an Evidence Chain · Free preview
- Identify Your Interpreter and Working Directory
- Create and Run an Exact Source File
- Trace Statements, Expressions, and Names
- Separate Output, Errors, and Exit Status
- Read and Repair Syntax and Name Errors
- Make Verifiable Changes and Use Comments Well
- Module Studio: Pocket Library Welcome Command
12 checkpoint questions
2. Variables and Basic Data Types9 lessons
Prerequisites: Complete Getting Started with Python or be able to create and run a UTF-8 file with CPython 3.12, predict straight-line execution, distinguish stdout, stderr, and status, and preserve failure evidence. No algebra beyond ordinary arithmetic, Boolean-logic vocabulary, or Unicode expertise is assumed.
Unit outcomes
- Distinguish source literals, runtime values, name bindings, types, expression results, and formatted text.
- Predict assignment and reassignment with complete state evidence, including failed right-side evaluation and unchanged prior bindings.
- Choose among str, int, float, bool, and None from fact meaning and permitted operations rather than visual appearance.
- Inspect current values with type() while explaining why observation does not permanently declare a name's type.
- Evaluate numeric expressions with explicit precedence, true division, floor division, remainder, exponentiation, and zero-boundary evidence.
- Create deliberate Unicode text with correct quoting, escapes, concatenation, length, case, and non-mutating transformation evidence.
- Evaluate comparisons into Boolean facts while preserving the distinction among False, empty text, zero, and None.
- Demonstrate binary floating-point representation limits and apply only the supplied measurement tolerance policy.
- Convert trusted representations under explicit policy and format display text without overwriting typed source values.
- Build and defend a deterministic Pocket Library scalar record and exact seven-line book-summary card.
Unit project
Build and defend an eight-artifact Pocket Library book-summary packet for one synthetic scalar record. Preserve BK-0072, derive numeric and Boolean facts, expose the supplied float-equality boundary, keep unknown year state as None, render the exact seven-line card, and bind every claim to reproducible CPython 3.12 evidence. Earn at least 75/100 with no critical evidence, representation, precision, output, privacy, or scope failure.
Guided practice
- Review a synthetic field schema and reject executable representations that lose identifier, count, Boolean, or absence meaning.
- Trace successful and failed reassignments, recording right-side results, retained bindings, types, stdout, stderr, and status.
- Predict arithmetic values and result types, then distinguish complete groups, remainders, and groups required at boundaries.
- Compare direct float equality, representation evidence, tolerance-based measurement claims, and display rounding without conflating them.
- Inspect Unicode, quote, escape, whitespace, and case transformations while preserving the authoritative text binding.
- Build named Boolean propositions and classify known false, zero, empty, and absent facts under an explicit schema.
- Convert trusted numeric text and render exact f-string output while proving source values and types remain unchanged.
- Complete and defend the eight-artifact Pocket Library book-summary studio against normal, failure, and clean-but-wrong cases.
Lesson sequence
- Choose Values Before You Name Them
- Trace Assignment and Reassignment as State
- Compute with Integers and Floating-Point Values
- Treat Floating-Point Results as Measurements
- Represent Text Deliberately
- Make Facts Explicit with Comparisons and Booleans
- Represent Absence with None
- Convert by Policy; Format for People
- Module Studio: Pocket Library Book Summary
12 checkpoint questions
3. User Input and Data Conversion9 lessons
Prerequisites: Complete Variables and Basic Data Types or be able to preserve scalar meaning, trace assignment, use strings, numeric types, comparisons, booleans, None, explicit conversion, and f-string formatting on CPython 3.12. General loops, functions, collections, exception architecture, locale parsing, files, and regular expressions are not assumed.
Unit outcomes
- Predict and prove that input() returns str, including for numeric-looking, whitespace-only, and empty responses.
- Write concise terminal prompts that identify the requested field, expected form, and useful constraint.
- Preserve raw responses separately from normalized candidates and converted values.
- Apply field-specific whitespace and case normalization without corrupting meaningful text.
- Distinguish presence, lexical, conversion, and domain validation and apply them in dependency order.
- Convert approved integer and decimal candidates through a narrow ValueError boundary.
- Produce neutral rejection messages that identify the condition, expectation, and next action.
- Trace a supplied three-attempt retry pattern and prove success, exhaustion, and response-consumption bounds.
- Prevent rejected or partially accepted fields from becoming a published record.
- Submit reproducible interaction evidence covering accepted, recovery, cancellation, hostile, and exact-output paths.
Unit project
Build and defend a nine-artifact Pocket Library add-book dialogue. Preserve raw input, apply field-specific normalization, order validation and narrow conversion, provide actionable messages, bound each required field to three attempts, stop after cancellation, and publish the exact four-field typed record only after every field passes. Earn at least 75/100 with no evidence, normalization, handler, retry, privacy, contract, or partial-publication critical failure.
Guided practice
- Capture numeric-looking, whitespace-padded, and empty responses and prove their exact representation and type.
- Review ambiguous, inaccurate, blame-oriented, and default-implying prompts against a declared field contract.
- Build normalization decision tables that preserve raw text, Unicode spelling, identifiers, and internal whitespace.
- Classify empty, malformed, convertible, out-of-range, and accepted candidates by their first failing stage.
- Execute int and float success and ValueError fixtures while leaving unrelated programming defects visible.
- Map every field failure to one neutral condition, expectation, and next-action message.
- Prove success on attempts one through three and exhaustion that leaves a valid fourth response unread.
- Complete and defend the nine-artifact Pocket Library add-book studio against partial publication and hostile defects.
Lesson sequence
- Treat the Terminal as a Text Boundary
- Write Prompts as Interface Contracts
- Preserve Raw Evidence; Normalize by Policy
- Order Validation Before Trust
- Convert Numeric Text at a Narrow Failure Boundary
- Validate Meaning and Offer a Next Action
- Bound Retry and Prove Termination
- Protect the Record Across a Multi-Field Dialogue
- Module Studio: Pocket Library Add-Book Dialogue
12 checkpoint questions
4. Conditional Logic9 lessons
Prerequisites: Complete User Input and Data Conversion or be able to preserve raw evidence, normalize and validate by policy, convert values explicitly, distinguish strings from booleans and numbers, and execute top-level CPython 3.12 scripts. Functions, loops, collections beyond a supplied tuple, pattern matching, files, and exception architecture are not assumed.
Unit outcomes
- Trace a condition, its controlled suite, skipped work, and shared continuation on CPython 3.12.
- Translate strict, inclusive, equality, and inequality policy language into tested comparisons.
- Name Boolean propositions, prove their truth tables, and identify stale derived state.
- Compose conditions with and, or, and not while proving left-to-right short-circuit evaluation.
- Build exhaustive two-way decisions without overclaiming the false-path domain.
- Order exclusive rules so the first matching branch owns deliberate overlaps.
- Choose independent statements for multiple effects and exclusive chains for one classification.
- Validate complete format codes with tuple membership and reject truthy-operand and substring defects.
- Flatten nested policy without changing refusal, equality, overlap, or remainder behavior.
- Submit a reproducible nine-artifact Pocket Library decision defense covering every rule owner.
Unit project
Build and defend a nine-artifact Pocket Library reading-status policy. Refuse invalid pages and unknown formats before classification; assign exactly one ordered status; prove Boolean, boundary, short-circuit, overlap, membership, branch, output, and source-identity evidence. Earn at least 75/100 with no fabricated evidence, evaluator modification, crash, unsafe zero-total evaluation, invalid-state status, duplicate status, wrong finished precedence, private data, or source/evidence mismatch.
Guided practice
- Trace true and false suites, indentation-only defects, and parse failures without inventing condition results.
- Build below, at, and above matrices for page, capacity, and threshold rules.
- Derive named propositions, complete truth tables, and stale-versus-fresh comparison evidence.
- Compare safe and reversed short-circuit order with a zero-total failure fixture.
- Repair overlapping status and shipping rules using explicit first-match precedence.
- Separate accumulating advisories from one owned status and repair membership defects.
- Prove nested and flat policy equivalence across every branch owner and refusal path.
- Complete and defend the nine-artifact Pocket Library reading-status studio against hostile defects.
Lesson sequence
- Trace a Condition and Its Suite
- Translate Boundary Language into Comparisons
- Name Boolean Decisions and Build Truth Tables
- Make an Exhaustive Two-Way Decision
- Order Exclusive Rules with elif
- Compose Conditions and Prove Short-Circuiting
- Separate Independent Rules from Exclusive Classification
- Flatten Policy and Prove Branch Coverage
- Module Studio: Pocket Library Reading-Status Policy
12 checkpoint questions
5. Working with Lists11 lessons
Prerequisites: Complete Conditional Logic or be able to preserve typed state, evaluate ordered if/elif/else decisions, use comparisons and equality membership, validate before mutation, and record exact CPython 3.12 stdout, stderr, status, and source identity. Learner-authored loops, comprehensions, functions, imports, exception handlers, dictionaries, sets, classes, files, generators, and custom sort keys are not assumed.
Unit outcomes
- Justify a list when order, positional access, mutability, and duplicate retention match the domain contract.
- Trace list objects, names, positions, values, aliases, and independently created equal states.
- Translate positive and negative indices into owned positions and refuse out-of-range access before mutation.
- Predict slice membership, clipped boundaries, positive steps, and fresh outer-list identity.
- Distinguish replacement, append, insertion, extension, and concatenation by exact state delta and ownership.
- Choose removal by equal value or owned position while preserving first-match, receipt, missing, and empty-state evidence.
- Enforce an at-most-one active identifier policy with equality membership, count evidence, and precondition-first refusal.
- Separate assignment aliases from shallow copies and state the shared nested-child limitation precisely.
- Distinguish in-place sorting, fresh sorted views, descending order, and structural reversal without losing priority.
- Derive cardinality, numeric totals, and extrema only when element types, units, and empty-state policy permit them.
- Apply an operation ledger so every accepted mutation and rejected request has reproducible preconditions and postconditions.
- Submit and defend a nine-artifact Pocket Library reading queue against hostile and unseen synthetic packets.
Unit project
Build and defend a nine-artifact Pocket Library reading queue from one frozen five-item state and a finite command packet. Preserve priority, at-most-one active identifiers, atomic move validation, exact accepted transitions, no-change refusals, fresh inspection/preview/report views, canonical evaluator fingerprints, and one reproducible source identity. Earn at least 75/100 with no fabricated evidence, evaluator modification, crash, mutation after refusal, active duplicate, wrong final order, partially applied invalid move, source/evidence mismatch, private data, or syntax-budget bypass.
Guided practice
- Draw object-position-value maps for aliases, equal independent lists, slices, and shallow copies before predicting mutations.
- Build positive, negative, empty, and out-of-range index matrices with exact accepted or refused state evidence.
- Derive slice index sets and distinguish clipped up-to requests from exact-width postconditions.
- Compare replacement, append, insert, extend, concatenation, remove, pop, and del through frozen state-delta ledgers.
- Enforce absent, uniquely active, and breached duplicate states without mutation after refusal.
- Produce preview and report views that prove fresh outer identity and exact live-priority preservation.
- Defend valid, empty, heterogeneous, and nested summary packets with explicit units and unavailable dispositions.
- Complete the nine-artifact reading-queue studio and disposition every hostile defect and unseen transfer.
Lesson sequence
- Model an Ordered Mutable Collection
- Create Exact List State and Trace References
- Translate and Validate List Indices
- Select Fresh Views with Slices
- Choose a List Growth or Replacement Operation
- Remove by Value or by Position
- Enforce Membership and Duplicate Policy
- Separate Aliases from Shallow Copies
- Sort Without Losing Priority Order
- Derive Safe Collection Summaries
- Module Studio: Pocket Library Reading Queue
12 checkpoint questions
6. Loops and Repetitive Tasks12 lessons
Prerequisites: Complete Working with Lists or be able to preserve ordered mutable state, validate conditions before mutation, use equality membership and numeric operators, and record exact CPython 3.12 stdout, stderr, and status. Learner-authored functions, comprehensions, dictionaries, sets, imports, exceptions, files, classes, recursion, async iteration, and unbounded random interaction are not assumed.
Unit outcomes
- Classify repetition as value-driven, count-driven, or condition-driven and justify the selected loop form.
- Trace a for loop as successive target binding and suite execution across zero, one, and several iterations.
- Derive exact integer sequences from range(start, stop, step), including empty and descending cases.
- Pair positions and values with enumerate without maintaining redundant index state.
- Design counters, totals, flags, and selected-result accumulators from explicit invariants and postconditions.
- Select and classify values while preserving input order and rejection evidence.
- Trace nested loops, identify the loop affected by control transfer, and calculate bounded work growth.
- Maintain a while-loop progress invariant and defend its finite termination argument.
- Use break, continue, and loop else only when their exact control-flow meaning is testable.
- Avoid unsafe mutation during traversal through a stable view or a separate result.
- Freeze terminal interaction with a finite transcript, exact output contract, and explicit exhaustion behavior.
- Build and defend a bounded Pocket Library menu against normal, boundary, hostile, and unseen transcripts.
Unit project
Build and defend a nine-artifact bounded Pocket Library menu driven by a finite command transcript. Preserve unique nonblank queue identifiers, exact accepted transitions, no-change refusals, occurrence-safe numbering, one ledger row per consumed command, distinct quit and exhaustion exits, an untouched unread suffix, stable traversal, canonical evaluator fingerprints, and one reproducible source identity. Pass all 9 locked evaluator tests and disposition every hostile defect without modifying the evaluator.
Guided practice
- Trace zero, one, and many target bindings and reconcile each with exact suite execution.
- Derive ascending, stepped, descending, and empty ranges before running them.
- Compare enumerate with a manually maintained display counter under the same output contract.
- Design accumulator ledgers whose initialization, update rule, and postcondition survive empty input.
- Reconcile nested-loop traces with exact body counts and nearest-loop control effects.
- Repair non-terminating while loops by stating and restoring the missing progress measure.
- Reproduce mutation-during-traversal loss, then repair it with stable-source and result-building patterns.
- Complete and defend the nine-artifact bounded-menu studio against unseen deterministic transcripts.
Lesson sequence
- Choose and Trace Repetition over Values
- Read Loop Suites and Binding State
- Generate Exact Bounded Sequences with range
- Pair Positions and Values with enumerate
- Design Accumulators from Postconditions
- Select and Classify without Losing Order
- Trace Nested Loops and Work Growth
- Prove while-Loop Progress and Termination
- Control an Iteration Deliberately
- Keep Traversal Stable while State Changes
- Choose a Loop and Freeze Interaction Evidence
- Module Studio: Bounded Pocket Library Menu
12 checkpoint questions
7. Dictionaries and Structured Data12 lessons
Prerequisites: Run CPython 3.12 scripts; use scalar values, lists, conditions, and bounded loops; validate before mutation; preserve ordering and duplicate policies; distinguish aliases from shallow outer copies; and capture exact process evidence. Learner-authored functions, comprehensions, sets, imports, exceptions, files, JSON parsing, classes, databases, recursion, and concurrency are not required.
Unit outcomes
- Choose a dictionary when stable key-to-value association, rather than numeric position, is the required access contract.
- Construct exact dictionary state with valid hashable keys and explain equality, insertion order, and key uniqueness at the taught boundary.
- Distinguish key membership from value search and absence from present None, False, zero, or empty text.
- Choose direct subscription, get, or an explicit sentinel from required-field and optional-field policy.
- Apply insertion, replacement, and multi-key update only after classifying the intended state transition.
- Remove entries with an explicit missing-key and receipt policy while preserving no-change refusal evidence.
- Traverse keys, values, and items deliberately without treating insertion order as record identity or mutating size during traversal.
- Validate a dictionary record's required fields, optional fields, value meanings, and extra-field policy without confusing shape with truth.
- Build a dictionary index from ordered records while detecting duplicate stable IDs before publication.
- Navigate nested structures and state precisely which nested objects remain shared after a shallow copy.
- Choose among list, dictionary, and tuple from mutability, order, identity, lookup, and duplicate requirements.
- Integrate these decisions into a finite Pocket Library catalog and defend it against unseen synthetic operation packets.
Unit project
Build and defend a finite Pocket Library catalog keyed by stable book ID. Pass all 10 locked evaluator tests without evaluator changes; preserve record validity, duplicate refusal, missing-state distinctions, exact top-level transitions, deterministic traversal, shallow ownership evidence, quit/exhaustion separation, and eight source-bound learner artifacts using synthetic data only.
Guided practice
- Compare an ordered queue, one named record, and a stable-ID index under reordered display output.
- Classify absent, None, False, zero, empty-text, and nonempty optional-field states using membership and exact values.
- Select subscription, an authorized default, or a unique sentinel for required and optional retrieval cases.
- Trace insert, replacement, whole-patch refusal, removal receipt, and deterministic traversal with exact before/after evidence.
- Validate required, optional, unknown, and cross-field record rules without mutating the candidate.
- Build a candidate index that preserves first records and every duplicate occurrence before publication.
- Draw a nested object graph and prove assignment, shallow outer copying, shared children, and explicit child rebuilding.
- Replay normal and hostile catalog packets, reconcile the operation ledger, and transfer the contract to synthetic dispatch data.
Lesson sequence
- Choose Named Association over Position
- Construct Exact Dictionary State
- Separate Presence from Stored Value
- Retrieve Required and Optional Fields Deliberately
- Classify Insert, Replace, and Update
- Remove with a Missing and Receipt Policy
- Traverse Keys, Values, and Items Intentionally
- Validate a Dictionary Record Contract
- Build an Index without Silent Overwrite
- Navigate Nested State and Prove Copy Depth
- Choose a Structure and Freeze Evidence
- Module Studio: Pocket Library Catalog by Stable ID
12 checkpoint questions
8. Functions and Code Reuse11 lessons
Lesson sequence
- Why Functions Are Useful
- Defining and Calling a Function
- Passing Function Arguments
- Parameters and Arguments
- Returning Values with return
- Default Parameter Values
- Keyword Arguments
- Variable Scope
- Decomposing a Problem into Functions
- Importing Functions and Modules
- Mini-Project: Calculation Toolkit
6 checkpoint questions
9. Files, Exceptions, and Data Persistence14 lessons
Lesson sequence
- Introduction to Data Persistence
- Understanding File Paths
- Working with pathlib
- Reading Text Files
- Writing Text Files
- Appending Content to a File
- Introduction to JSON
- Saving Structured Data
- Loading Structured Data
- Understanding Exceptions
- Handling Exceptions with try and except
- Using else and finally
- Writing Clear Error Messages
- Mini-Project: Persistent Score Tracker
6 checkpoint questions
10. Object-Oriented Programming Fundamentals11 lessons
Lesson sequence
- From Data and Functions to Objects
- Understanding Classes and Objects
- Defining a Class
- Initializing Objects with __init__()
- Understanding the self Parameter
- Defining Instance Attributes
- Defining Instance Methods
- Creating and Using Multiple Objects
- Updating Object State
- Introduction to Composition
- Mini-Project: Library Item Manager
6 checkpoint questions
11. Testing and Debugging11 lessons
Lesson sequence
- Understanding Bugs and Failures
- Reading Tracebacks
- Using Print-Based Debugging
- Formulating Debugging Hypotheses
- Using assert for Simple Checks
- Introduction to Automated Testing
- Writing Tests with pytest
- Testing Return Values
- Testing Expected Exceptions
- Refactoring Code Safely
- Mini-Project: Test an Existing Application
6 checkpoint questions
12. Final Project: Building a Command-Line Application12 lessons
Lesson sequence
- Defining the Project Requirements
- Identifying Inputs, Processes, and Outputs
- Selecting Appropriate Data Structures
- Designing the Program Flow
- Implementing the Minimum Viable Product
- Splitting the Program into Functions
- Adding Data Persistence
- Handling Invalid Input and Runtime Errors
- Writing Automated Tests
- Refactoring and Improving Code Quality
- Writing User Documentation
- Final Project Review
6 checkpoint questions