Python Foundations for AI
Move from using AI tools to understanding the code and data skills behind them. This course teaches beginner-friendly Python with examples aimed at notebooks, datasets, and AI practice.
Start course
Start with AI Foundations
Read lessons without an account. Sign in only to save continuation, completion, and learner badges. No certificate or formal credential is issued.
Turn AI understanding into practical coding confidence
AI Foundations helps you understand the concepts. Python Foundations helps you begin building: reading code, working with data, using notebooks, and understanding the examples that appear in AI and machine learning tutorials.
- AI Foundations helpful
- No prior programming needed
- Built for notebooks and data
Understand variables, values, expressions, and the shape of simple Python programs.
Work with strings, lists, tuples, dictionaries, and common patterns for organizing information.
Use conditions and loops to make small programs respond to data and decisions.
Package repeated logic into readable, reusable building blocks.
Read tracebacks, handle expected errors, and use small tests to confirm that code behaves as intended.
Load, clean, transform, and explore simple datasets: the everyday substrate of AI work.
Feel comfortable in the standard environment for AI, data, examples, and experiments.
Ten modules from first code to an AI-ready data project
The sequence gives core Python, problem-solving, debugging, files, NumPy, and pandas separate room to develop. Every module includes code practice, and the final project combines the skills without pretending that introductory Python alone makes someone an AI engineer.
Running Python and thinking in steps
- How Python executes code
- Notebook cells, kernels, state, and execution order
- Reading code and using built-in help
- Checkpoint: build and rerun a small notebook without hidden state
Values, variables, types, and text
- Numbers, strings, booleans, and None
- Variables, arithmetic, comparisons, and conversion
- Indexing, slicing, string methods, and formatting
- Checkpoint: clean and summarise a supplied block of messy text
Collections and structured information
- Lists, tuples, dictionaries, and sets
- Mutability, copying, membership, and nested structures
- Collection operations and conversions
- Checkpoint: represent and transform a small labelled dataset
Conditions, loops, and problem decomposition
- Boolean logic and branching
- For and while loops, range, break, and continue
- Accumulators, readable comprehensions, and edge cases
- Checkpoint: validate supplied records and report rejected values
Functions, modules, and readable code
- Parameters, return values, scope, and side effects
- Docstrings, basic type hints, naming, and separation of concerns
- Imports, standard-library modules, packages, and environments
- Checkpoint: convert repeated cleaning logic into documented functions
Errors, debugging, validation, and tests
- Syntax, runtime, and logic errors
- Tracebacks, reproducible failures, input validation, and exceptions
- Assertions, focused tests, and generated-code review
- Checkpoint: diagnose, repair, and explain a broken program
Files, paths, CSV, and JSON
- Portable paths, text encodings, and context managers
- CSV and JSON structure
- File validation, provenance, and non-destructive outputs
- Checkpoint: convert supplied records between CSV and JSON
NumPy foundations
- Arrays, shapes, dimensions, and data types
- Indexing, slicing, masks, and vectorised operations
- Aggregation, axes, broadcasting, copies, and views
- Data project: analyse and validate a supplied numerical dataset
pandas and practical data preparation
- DataFrames, selection, missing values, and data types
- Cleaning, derived columns, grouping, and simple plots
- Combining tables, checking unmatched records, and exporting results
- Data project: prepare and explain a messy, rights-cleared dataset
Capstone: reproducible AI-ready data notebook
- Define a bounded question and inspect the supplied dataset
- Plan, clean, validate, transform, and summarise the data
- Record provenance, assumptions, limitations, and responsible-use checks
- Final deliverable: a rerunnable notebook, data note, findings note, and reflection
Designed for learners who are new to code
Beginners with no programming background, professionals moving toward technical AI work, and learners continuing from AI Foundations.
No prior programming required. AI Foundations or equivalent familiarity with AI concepts is recommended.
Self-paced online lessons with hands-on coding activities in every module.
Continue toward machine learning
After Python Foundations, Machine Learning Foundations becomes much easier to follow because datasets, notebooks, and code examples already feel familiar.
Course status: available now
Work through ten text-first modules, practise in the browser-based Python lab, or download the complete notebook pack for local Jupyter. Use only the supplied fictional and synthetic data.
