
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Overview. Python for AI from zero: the AI expense helper, running. The finished project running first, then the plan for the course, what you need, and the course code (attached here as a download).
Hands-on. Set up Python for AI on any laptop: Python, VS Code, venv, uv, Ollama. Practical for this section: setup_report(): check a teammate's machine before a workshop.
Hands-on. Python basics on real expenses: variables, lists, dicts, loops, functions. Practical for this section: spend_summary(): totals per person, who is over budget.
Hands-on. Clean a messy CSV file with Python: pathlib, csv, a report and JSON. Practical for this section: parse_amount(): every format a real amount column has.
Hands-on. Pandas for AI work: clean, summarise, cross-check, and a date bug. Practical for this section: top_spenders(): top n people by total.
Hands-on. JSON, APIs and API keys in Python, safely. Practical for this section: latest_versions(): never crash on 404, 500 or no network.
Quick note: if this course has been useful so far, an honest review helps other learners decide whether it is right for them. It takes about 10 seconds, and you can update it any time as you go further. Questions or anything unclear? Ask in the Q&A, I reply to every one.
Hands-on. Call an AI model from Python and check its answers. Practical for this section: parse_reply(): accept a model answer only if valid and its amount is in the receipt.
Hands-on. Ship your first AI web app: FastAPI, a page, tests, capstone. Practical for this section: make_app(): FastAPI /total with validation.
This course contains the use of artificial intelligence.
Python is the language AI is built in, and this course takes you from an empty computer to a working, tested AI app, with no coding experience needed. Everything runs on an ordinary laptop with a local AI model (smollm2, 270 MB, through Ollama): no API key, no card, and your data never leaves your computer.
You learn every idea on one real job: an office expense sheet with every problem real sheets have (dollar signs, commas, a typo, a duplicate, a missing amount, two date styles). You set up Python, VS Code and a virtual environment and check your machine in one command; learn variables, lists, dictionaries, loops and functions, and read your first traceback; clean the sheet with pathlib and csv; do the same in pandas and cross-check it; read and write JSON, call a real web API with proper error handling, and keep API keys out of your code; call an AI model from Python, force its answers into a fixed shape with Pydantic, score it on a test set, and block invented numbers; and finally ship a FastAPI web app with a page and 28 automatic tests that keeps working even when the AI model is down.
The model is tiny on purpose. You see its real mistakes (it invented $100 for a $58 train ticket), the two bugs a correct total would have hidden, and the one idea that took the receipt amounts from 4 right out of 8 to 8 out of 8. Every output shown is from a real run (31 October to 8 November 2026); the code, logs, tests, practicals and cheat sheets are included. Narration is AI-voiced; the code, runs and results are real.
The course is 2 h 14 min of video in 8 sections. Section 1 is the overview and setup; the other sections are hands-on, and every program is run for real on screen. Each hands-on section comes with a one-page cheat sheet (PDF), a short quiz, a practical with starter and solution files and an assignment with a model answer; 5 coding exercises let you write the code yourself.