Your browser doesn't support speech here. You can still read everything, or try Chrome, Edge or Safari.
Course 1 of 10 · Beginner
Python
Your first programming language, for AI. Variables, loops, functions, data structures, files, classes and Pythonic code, then NumPy, pandas, plotting and the developer tools every AI engineer uses.
How this course works
Welcome
- Level: Beginner. You need: No prior knowledge.
- Starting from zero? Begin with Start here. Every code example runs in the page, so you need nothing installed until the Tools topic.
- Already program in another language? Skim Python basics and try the checkpoint.
- Pick a topic from the sidebar; they go in order. Press ▶ Play this topic to hear a lesson read aloud, or 🔊 Explain on one section.
- Topics climb from Beginner to Intermediate · Maths, Advanced and Code; use the Show chips to hide levels you don't need. Most have a Watch it animation, Try it demos and runnable code examples, and every topic ends with a quiz: answer it to mark the topic done ✓.
- Stuck? Press 💬 Ask the AI tutor: a small free AI model that runs on your own device and answers from the course.
- Progress is saved in this browser and shared across all the courses on this site.
Learning path: 🐍 Python → 🗄️ SQL & Databases → ∑ Maths for AI → 📈 Machine Learning → 🧠 Deep Learning → 👁️ Computer Vision → 💬 Natural Language Processing → ✨ Generative AI & LLM Apps → 🚀 Flask & Deployment → 🔬 Becoming an AI Researcher
Getting started
1. Python Course: Start HereNo experience needed. What you will learn, how long it takes, how each lesson works, and where to run your code: in this page, in the playground, or on your own computer.2. Set Up Python on Your ComputerInstall Python on Windows, macOS or Linux, install VS Code, run your first .py file, use the terminal, install packages with pip inside a virtual environment, open Jupyter notebooks, and fix the problems almost everyone meets.3. Your First Program: print, Comments & inputWrite your first lines of Python: show text and numbers with print, leave notes with comments, ask the user a question with input, and read your first error messages without panic.
Python basics
4. Values, Variables & NumbersStore values in variables, meet the basic types (whole numbers, decimals, text and True/False), do arithmetic, and convert between types. Then watch variables change one line at a time.5. Strings: Working with TextText is everywhere in data. Index and slice strings, use the most useful string methods (strip, lower, split, replace, find, join), format output with f-strings, and handle quotes, new lines and special characters.6. Making Decisions: if, elif & elseLet your program choose what to do: comparisons, True and False, if, elif and else, combining tests with and, or and not, and the indentation that shows which lines belong to each choice.7. Loops: Repeating Work with for & whileMake the computer do the repetitive work: for loops over lists, strings and range, counting and adding up with loops, while loops that repeat until something happens, break and continue, loops inside loops, and how to avoid endless loops.8. Lists & Tuples: Ordered CollectionsKeep many values in one variable: create lists, read items by position, add, remove, sort and search, slice and copy safely, and use tuples for fixed groups of values. Then see why two names can point to one list.9. Dictionaries & Sets: Look Things Up FastStore values by name instead of by position: create dictionaries, read, add, update and delete entries, loop over keys and values, count things, use nested records like JSON, and remove duplicates and compare groups with sets.10. Functions: Write Code Once, Use It Many TimesPackage steps into your own functions: def, parameters and arguments, return values, the difference between print and return, default values, keyword arguments and docstrings. Then watch a function call step by step.11. More Functions: Scope, Lambdas & RecursionWhere variables live (local and global scope), functions as values, lambda and sorting with a key, *args and **kwargs, the mutable default trap, and recursion: functions that call themselves.
Writing real programs
12. Errors, Exceptions & DebuggingRead tracebacks calmly, handle errors with try and except, raise your own errors to validate input, and debug with print, logging, assert and the debugger.13. Files: Reading & Writing Text, CSV & JSONKeep data after your program ends: open, read and write text files safely with with, build file paths with pathlib, and read and write the two formats you will meet most, CSV tables and JSON records.14. Modules, Packages & the Standard LibraryReuse code that already exists: the ways to import, a tour of the most useful standard-library modules (math, random, datetime, collections, statistics, os and sys), installing outside packages, reading documentation, and splitting your own program into modules.15. Classes & ObjectsBundle data and behaviour into classes: __init__, attributes, methods, special methods, inheritance, dataclasses, and how scikit-learn models and PyTorch networks are classes you already use.16. Pythonic Python: Comprehensions, Generators, Decorators & Type HintsWrite Python the way experienced programmers do: comprehensions, iterators and generators, the most useful built-ins and standard-library tools, decorators, type hints and style.17. Your First Projects: Three Small ProgramsPut everything together in three complete programs: a number-guessing game, a to-do list that saves to a file, and an expense tracker that summarises a CSV. Plan, build step by step, test and extend each one.
Python for data
18. NumPy: Fast ArraysThe array library under all of ML: shapes, indexing, boolean masks, axes, broadcasting and vectorised maths.19. pandas: Working with TablesDataFrames: loading, inspecting, selecting, filtering, creating columns, grouping, merging, reshaping and dates.20. Plotting with Matplotlib & seabornFigures and axes, the five chart types you need, labels that make charts readable, seaborn for statistical plots, and the standard ML evaluation plots.
Tools of the trade
When you finish
Next course
🗄️ SQL & DatabasesAsk questions of your data. SELECT and filtering, grouping, joins, subqueries, CTEs and window functions, designing tables, and SQL for machine learning, with a live database in the page.∑ Maths for AIThe maths behind the models, visually. Notation, vectors and matrices, derivatives and gradients, probability and statistics, eigenvectors, optimisation, information theory and numerical stability, each with interactive pictures.