Skip to content

daniel-craft/programming-foundations

Python Programming Foundations

Python 3.14+ Licence: MIT Contributions Welcome

A comprehensive, self-paced course that takes you from writing your first line of Python to building production-quality software. Structured like a university computer science programme, but distilled into a practical curriculum you can work through at your own pace.

Start Here

Who This Course Is For

  • People in technical or adjacent roles who can read Python or automate small tasks but never got the formal foundations behind problem-solving and program design
  • Self-taught developers who want to fill gaps in their computer science foundations and stop relying on tutorials or AI for every blank file
  • Complete beginners who want a structured, rigorous path rather than a quick "learn Python in a weekend" crash course
  • Career changers who want to build real software and understand how experienced developers think, not just copy examples

If you want a structured way to build real programming ability without needing a computer science degree, this course was built for you.

The course is written to be rigorous without assuming a computer science degree. It uses short focused modules, clear progression, and active learning throughout. Early modules are more guided by design; later modules become more direct as your confidence and technical range grow.

What This Course Covers

Part Modules Focus
Part 1: Foundations 01-06 Computational thinking, Python basics, control flow, functions
Part 2: Working with Data 07-12 Collections, strings, files, comprehensions, error handling
Part 3: Building Real Programs 13-18 Modules, project structure, Git, testing, debugging, APIs
Part 4: Object-Oriented Programming 19-24 Classes, inheritance, composition, special methods, dataclasses
Part 5: Computer Science Fundamentals 25-30 Big-O, sorting, recursion, data structures (trees, graphs, hash tables)
Part 6: Advanced Python 31-36 Generators, decorators, concurrency, clean code, design patterns
Part 7: Professional Development 37-42 Advanced testing, databases, web APIs, Docker, CI/CD, architecture

Each part ends with a hands-on project that integrates everything you have learned.

How the Course Is Organised

The repo is designed for both reading and hands-on work.

  • Part folders contain modules, a quiz, and a project.
  • docs/ contains course-wide setup, study, and further-learning guidance.
  • appendices/ contains quick references and supporting notes you will revisit throughout the course.
  • Each module folder contains a README.md with the teaching content and an exercises/ folder for the practical work.
  • Inside exercises/ you will usually find exercises.md, starter files such as exercise_01.py, and a solutions/ directory.
  • Use the hands-on course in this order: root README.md -> part README.md -> module README.md -> exercises/exercises.md -> matching starter file.
  • Use the reading edition when you want to read, review, annotate, or navigate the course in a Markdown-first workflow. The main repo remains the working surface for exercises, starter files, check.py, and solutions.

If raw folder browsing feels noisy in GitHub or VS Code, use the part READMEs as your main navigation pages rather than opening module folders at random.

How to Use This Course

  1. Work through the parts in order. Each part builds on the previous one.
  2. Type every code example yourself. Do not copy-paste. The physical act of typing builds muscle memory.
  3. Do the exercises before looking at solutions. Most modules include starter files (exercise_01.py, etc.) -- read the exercise brief, then complete the starter file. Struggling is where learning happens.
  4. Complete each part's project. Projects tie the modules together and build your portfolio.
  5. Verify your work. In early modules, run your starter file and compare output with the expected results in the comments. In later coding modules, if check.py is present, use pytest check.py -v for automated checks.

If you prefer to read the material once before you start coding, use the reading edition for that first pass, then return here for the practical work.

Already Know Some Python?

This course starts from zero, but experienced readers do not need to begin at Module 01:

For detailed study strategies, see the Study Guide.

Prerequisites

  • A computer with Python 3.14 or later installed
  • A text editor or IDE (VS Code recommended for beginners)
  • No prior programming experience required

See Prerequisites for setup instructions. See Python Environments and Packages for the standard venv/python -m pip model, what site-packages is, and why this course recommends uv for ongoing work after you understand the basics.

Getting the Course Locally

If you are new to GitHub or Git, use the ZIP download option first. You do not need Git just to start learning from Parts 1-2.

Option 1: Download ZIP from GitHub (easiest)

  1. Open the repository page in your browser.
  2. Click the green Code button.
  3. Click Download ZIP.
  4. Extract the ZIP somewhere easy to find, for example Documents\programming-foundations.
  5. Open that folder in VS Code or your editor of choice.

Option 2: Clone with Git (better if you already use Git)

Run this in your terminal:

git clone https://github.com/daniel-craft/programming-foundations.git
cd programming-foundations

What to Do After Downloading or Cloning

  1. Open the course folder in your editor.
  2. Read this README.md first.
  3. Check docs/prerequisites.md if you still need to install Python or VS Code.
  4. If you are a complete beginner, start at Part 1: Foundations.
  5. If you already know basic Python, use the skip-ahead guidance above.
  6. Create a simple file like hello.py and run it to confirm Python works.

If you want an isolated Python environment for exercises and projects, you can create one inside the course folder:

python -m venv .venv

On Windows:

.venv\Scripts\activate

On macOS/Linux:

source .venv/bin/activate

This is optional at the start, but useful once you begin running projects and exercise checks. Later in the course, after you have seen the standard Python workflow once, the recommended day-to-day workflow shifts to uv.

Course Philosophy

Think before you code. Every module teaches you to understand the problem first, plan your approach in plain English, then write code. This is the single most important skill in programming.

Build things. Reading about programming is not programming. Every module includes exercises, and every part ends with a project. The course is designed around doing, not watching. Many coding modules also include optional offline check.py files so you can verify your work locally without needing an external platform.

Understand why, not just how. Knowing that a dictionary is faster than a list for lookups is useful. Understanding why (hash tables, O(1) vs O(n)) makes you a better programmer in every language you will ever use.

Security is not an afterthought. Rather than a standalone "security module" at the end, security practices are woven into the modules where they naturally apply -- input validation with error handling, SQL injection with databases, secrets management with project structure.

Module Format

Every module follows the same structure:

  • Introduction -- What this covers and why it matters
  • Prerequisites -- Which modules should be completed first
  • Learning Objectives -- What you will be able to do after completing the module
  • Concepts -- Core content with runnable code examples
  • Worked Examples -- Complete annotated solutions to realistic problems
  • Exercises -- Practice (direct application), Challenge (combine concepts), Extension (open-ended)
  • Key Takeaways -- Summary for review
  • Further Reading -- Carefully chosen external resources

Contributing

If you spot an error or have suggestions, please open an issue. Contributions are also welcome -- see CONTRIBUTING.md for guidelines.

Licence

See LICENCE for details.

About

A complete, self-paced Python course covering programming fundamentals, software engineering, computer science, and real-world projects.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors