From your first line of Python to AI research.
20 modules and 60 lessons in 4 stages. Every lesson has real Python practice that runs in your browser and a short quiz. The course is free and open to everyone. Start with no assumed Python knowledge. Learn programming, data science, machine learning, and research through practical examples.
Start the first lessonFoundations
Modules 01 to 06
Your first Python program
Turn a reading, a formula, and a real question into working Python.
- Make Python say something
- Name values and keep the units
- Build a useful calculator
Work with everyday data
Use numbers, text, lists, and records to organise useful information.
- Clean text and convert numbers
- Keep a sequence in a list
- Describe a record with a dictionary
Make decisions and repeat work
Turn rules into conditions and process a whole dataset with loops.
- Turn a rule into a condition
- Process every value with a for loop
- Repeat until a target is reached
Write reusable solutions
Build small functions that turn clear inputs into useful outputs.
- Put a calculation in a function
- Turn a list into an answer
- Combine small functions
Read data and catch mistakes
Load CSV data, handle expected failures, and check important results.
- Read and write CSV data
- Handle a bad value without hiding it
- Check results with small tests
Build code people can reuse
Organise small projects with classes, clear functions, and repeatable setup.
- Keep data and behaviour together
- Make a small project readable
- Make an experiment repeatable
Data science
Modules 07 to 09
Think in arrays
Turn sensor readings into fast calculations with NumPy, vectors, and simple linear algebra.
- Read and filter sensor arrays
- Calculate energy across a grid
- Solve a simple engineering model
Make messy data useful
Clean tables, combine records, and answer useful questions with pandas.
- Clean a small transaction table
- Join meters to sites
- Ask better questions of a table
See patterns and uncertainty
Build honest charts, compare summaries, and show how uncertain an estimate can be.
- Choose a chart that answers a question
- Separate a pattern from a cause
- Build an interval with resampling
Machine learning
Modules 10 to 15
Build an honest ML workflow
Define a prediction task, prevent data leakage, and compare your model with a simple baseline.
- Split before you learn
- Keep preprocessing inside a pipeline
- Set a baseline worth beating
Predict a number
Fit regression models, understand loss, and compare models across validation folds.
- Fit a line and inspect its errors
- Watch a model learn from loss
- Compare models across folds
Predict a category
Train classifiers, read confusion matrices, and choose thresholds for meaningful tradeoffs.
- Turn a probability into a decision
- Read errors when positives are rare
- Choose a threshold on validation data
Learn with trees and ensembles
Model nonlinear patterns, compare forests, and tune a model without using test labels.
- Control a tree before it memorizes
- Combine trees and inspect their signals
- Tune, test, and write a model card
Find hidden patterns
Group sensor readings, compress features, and spot unusual activity without labels.
- Group machines with k-means
- Compress correlated sensors with PCA
- Flag unusual payments with a robust score
Forecast what comes next
Build time features, evaluate in date order, and compare honest forecasting baselines.
- Build features that respect time
- Validate by walking forward
- Beat a seasonal baseline
AI & research
Modules 16 to 20
Build a neural network
Follow numbers through a network, learn with gradients, and check backpropagation.
- Follow a forward pass
- Learn weights with gradient descent
- Backpropagate and check a gradient
Turn language into numbers
Represent maintenance text, compare vectors, and inspect a small attention calculation.
- Represent maintenance notes
- Compare documents with vector similarity
- See how attention mixes information
Build grounded AI workflows
Retrieve useful passages, answer with evidence, and evaluate an offline RAG prototype.
- Retrieve passages from a small library
- Answer with sources or abstain
- Evaluate retrieval and grounded answers
Make responsible model decisions
Inspect group errors, challenge explanations, and protect sensitive records.
- Compare errors across groups
- Challenge a model explanation
- Minimise data and validate inputs
Do research that others can trust
Run reproducible experiments, monitor changing data, and assemble a capstone evidence report.
- Make an experiment reproducible
- Monitor change after deployment
- Build a capstone evidence report
Free, open and run by a nonprofit.
This page is part of Python to AI, a free course of 20 modules and 60 lessons in the engineering.fit( ) Learning Lab. The Learning Lab is built and run by engineering.fit( ), a nonprofit founded by Abdullateef Opeyemi Bakare that helps African engineering students gain research experience. You do not need an account or pay a fee to learn.