Lawfare Academy

AI & COMPUTER SCIENCE ACADEMY · Foundations

Extended teaching and cumulative practice

Open the course workbook: six explained laboratories, transfer problems, twelve new cumulative questions and the project rubric →

Full teaching sequence and cumulative subject work

A complete ledger pipeline with a falsifiable specification — primary material, constructed-response tasks, complete worked model and changed-case examination →

CS 101 — Programming Foundations with Python

Study programming foundations with python through six sequenced teaching units, original explanations, worked code, changed-condition exercises, explained checks and full assigned primary-source study.

Preparation: No prior programming. Basic arithmetic; access to a computer with Python 3.

A suggested sixteen-week study sequence. Allow 8–12 hours weekly for original instruction, full assigned readings, coding and practice; web/database study may require additional time. Adjust to your preparation.

Follow this course in My Learning →

Sixteen-week study map

The sequence integrates complete on-site readings, original instruction and applied practice. Readings reused for review are not counted again in teaching totals.

  1. Week 1: Values, names, types and a precise specification

    Trace the original worked example and reproduce its result.

  2. Week 2: Values, names, types and a precise specification

    Work the changed-condition problem before opening its solution.

  3. Week 3: Control flow, iteration and loop invariants

    Trace the original worked example and reproduce its result.

  4. Week 4: Control flow, iteration and loop invariants

    Work the changed-condition problem before opening its solution.

  5. Week 5: Control flow, iteration and loop invariants

    Complete the transfer problem and diagnose a deliberately wrong answer.

  6. Week 6: Functions, decomposition and collection design

    Trace the original worked example and reproduce its result.

  7. Week 7: Functions, decomposition and collection design

    Work the changed-condition problem before opening its solution.

  8. Week 8: Functions, decomposition and collection design

    Complete the transfer problem and diagnose a deliberately wrong answer.

  9. Week 9: Exceptions, files and validated boundaries

    Trace the original worked example and reproduce its result.

  10. Week 10: Exceptions, files and validated boundaries

    Work the changed-condition problem before opening its solution.

  11. Week 11: Exceptions, files and validated boundaries

    Complete the transfer problem and diagnose a deliberately wrong answer.

  12. Week 12: Tests, debugging and evidence of correctness

    Trace the original worked example and reproduce its result.

  13. Week 13: Tests, debugging and evidence of correctness

    Work the changed-condition problem before opening its solution.

  14. Week 14: Tests, debugging and evidence of correctness

    Complete the transfer problem and diagnose a deliberately wrong answer.

  15. Week 15: Modules, reproducibility and an integrated estimator

    Trace the original worked example and reproduce its result.

  16. Week 16: Modules, reproducibility and an integrated estimator

    Work the changed-condition problem before opening its solution.

Open the integrated reference project and checks →

Course sequence

Weeks 1–2

Values, names, types and a precise specification

Study CS50 Python: Functions, Variables and Conditionals; then Python Tutorial: An Informal Introduction and More Control Flow Tools. Work the source exercises, then implement the estimator below.

Read the lesson and worked example →

Weeks 3–5

Control flow, iteration and loop invariants

Study CS50 Python: Loops. Read the Python Tutorial sections on for, range, break and continue. Trace each iteration before running a program.

Read the lesson and worked example →

Weeks 6–8

Functions, decomposition and collection design

Study CS50 Python: Libraries and Object-Oriented Programming. Read Python Tutorial: Defining Functions and Data Structures. Focus on functions first; use classes only when they clarify state.

Read the lesson and worked example →

Weeks 9–11

Exceptions, files and validated boundaries

Study CS50 Python: Exceptions and File I/O; Python Tutorial: Input and Output and Errors and Exceptions. Use fictional CSV records only.

Read the lesson and worked example →

Weeks 12–14

Tests, debugging and evidence of correctness

Study CS50 Python: Unit Tests and Regular Expressions. Read Python Tutorial sections on assertions and exceptions. Test parsing and calculation independently.

Read the lesson and worked example →

Weeks 15–16

Modules, reproducibility and an integrated estimator

Complete the remaining CS50 Python units and attempt its final project guidance. Review the Python Tutorial: Modules, Classes and Virtual Environments and Packages. Keep this Academy project distinct from any external submission.

Read the lesson and worked example →

Optional integration project

Build a command-line work-order estimator: validate records, calculate integer-cent totals, save CSV output, and test normal, boundary and invalid cases.

Assess your work

Return to the academy →