A first machine learning project for a teen can be small and understandable. The aim is to ask a clear question, examine the data and check results on new examples. An impressive score does not replace that explanation.
These three project ideas follow the Python foundations. In our Python and AI classes for teens aged 14+, data and machine learning come after the student is comfortable with programming. The starting point depends on existing skills.
Which Python skills should come first?
A student should be able to loop through a list, use a function, read a file and investigate a simple error message. They also need to identify rows and columns in a table. If these ideas are new, begin with this first Python quiz for 14-year-olds and smaller programming projects.
For the flower and digit projects below, scikit-learn includes small teaching datasets. They provide a way to explore models without collecting classmates’ personal information.
Project 1: classify flowers from their measurements
The question: can a model suggest a flower species from measurements? The Iris dataset contains measurements and known categories. Start by displaying a few rows, identifying the units and plotting two measurements.
The student then tries a simple classifier, such as a small decision tree. They set aside examples for testing before training, then compare predictions with the known answers.
- Show: a chart, several predictions and a mistake if one occurs.
- Explain: which measurements the model receives and which category it is trying to predict.
- Useful extension: compare the result with a basic rule, such as always suggesting the same category.
This project makes the difference between input information and the answer to be predicted concrete. Accidentally including the answer among the inputs would make the check misleading.
Project 2: recognise handwritten digits
The question: can a model distinguish images of digits? The Digits teaching dataset represents small images as numerical values. The student displays some images, their labels and model predictions.
Begin with the supplied images, then look for examples that the model confuses. A useful explanation shows a mistake and suggests why two digits might look similar.
- Show: a small gallery with predicted and expected labels.
- Explain: how an image can be represented as a grid of numbers.
- Useful extension: compare errors for two categories rather than reporting only an overall score.
A model that works on this teaching dataset will not automatically work on a photograph from a phone. Image size, background and representation can all change the task.
Project 3: explore numerical predictions using fictional data
The question: can a model recover a relationship in a table? The instructor prepares fictional data, such as distance and journey time, with deliberately added variation.
The student plots the points, fits a simple regression model and compares predictions with expected values on rows reserved for testing. They can inspect an average error and show a case where the prediction is less accurate.
- Show: the points, predictions and a comparison with a basic starting estimate.
- Explain: the units and the difference between predicting a category and predicting a number.
- Useful extension: try an input far beyond the observed range and discuss why that result is fragile.
The exercise demonstrates a learning method. Fictional data does not justify presenting the result as a dependable real-world forecast.
How should a teen check a first model?
Reserve examples before training and use them to check results. Any preprocessing that learns parameters from data should be fitted on the training portion and then applied to the test portion. A pipeline helps keep those steps together.
If the student repeatedly consults the test score to choose settings, that test is no longer a completely fresh check. As the project develops, an instructor can introduce an appropriate validation/test split or cross-validation.
Ask which mistakes the model makes, what simple approach it is being compared with and which examples may be missing. Those questions make a demonstration more meaningful than an isolated percentage.
Training a model and using an AI tool are different project choices
With a model trained on a small table, the student chooses inputs, separates examples and examines the learning process. With a pretrained tool, a substantial part of the model development has already happened elsewhere. Either can support a project if the student clearly explains what they built themselves.
Families mainly interested in prompting and checking existing AI tools can consider a separate Generative AI learning path without Python prerequisites.
Find the right Python class for your teen
CodEnfant’s Python and AI classes for teens aged 14+ are live, one-to-one online lessons. The path covers Python foundations, games and applications, then data and AI when the student is ready. Progress depends on understanding and practice.
Technical references: scikit-learn teaching datasets, first models and evaluation, common pitfalls and data leakage.
Which learning path fits your child?
Age, experience and interests help us choose a suitable starting point.
Compare programs →


