← All Intro to AI lessons

Capstone — Build a Concept Manipulative

Capstone · the culmination of the course.

This capstone integrates the skills developed throughout the course. You will build and deploy a small, functioning application from start to finish, working with an AI assistant.

The brief

Build a concept manipulative: a single web page someone can interact with to understand one idea. A manipulative does not just explain — it lets the learner do something and see what happens.

Your concept: conditional probability

For this capstone the concept is fixed: build a manipulative that makes conditional probability click — how the chance of something changes once you know that something else has happened. You met the idea in Lesson 2; now you will build the thing that teaches it to someone else.

It is well suited to a manipulative, because the concept is best understood by changing the conditions and observing the resulting change in probability. Select one concrete scenario for the learner to manipulate. The following are illustrative options:

Whichever scenario you select, the learner should be able to perform one action — change a condition — and immediately observe the effect on the probability. Once you can describe your scenario, identify its intended audience, and specify what the learner changes on the page, you are ready to proceed.

Follow the lifecycle

Run the project through the seven stages from Lesson 5. Here is what each one means for this build.

1

Idea and audience

Write one sentence: which situation, for whom. Example: "A bag-of-marbles manipulative, for a student meeting conditional probability for the first time."

2

Define the MVP

Name the single core interaction — the one thing the learner does. Everything else (themes, scoring, extra modes) goes on a "later" list.

3

Plan in small steps

With your AI assistant, turn the MVP into an ordered list of small steps — layout, then the interaction, then the visual feedback.

4

Build with an AI assistant

Work step by step. Give context, ask for one step at a time, and read what the AI changed before moving on. Keep everything in one HTML file.

5

Test it

Open the file and use it. Does the core interaction work? Does the concept actually come across? Try it on a phone-sized screen.

6

Iterate

Hand it to someone unfamiliar with the concept and watch — do not help. Fix the most confusing thing they hit. Then, if you want, pull one item off the "later" list.

7

Deploy it

Provide the finished file to at least one real user. Distribution to a user is what distinguishes a deployed application from a merely saved file.

How the starter file works

The editor below begins with a small working example: a slider that fills a bar. It is approximately 40 lines, and every web page — however complex — is built from these same components. Reading this once will enable you to follow what your AI assistant produces and to request changes using precise terminology.

The big picture

An HTML file is just a text file with a structure. Every page has two halves wrapped in one <html> container:

<!DOCTYPE html>
<html lang="en">
<head> <!-- settings the visitor never sees: title, styling, setup --> </head>
<body> <!-- everything the visitor actually sees and clicks --> </body>
</html>

The head contains configuration that the visitor does not see; the body contains everything the visitor sees and interacts with. This distinction organizes the rest of the structure.

1 · The opening lines

<!DOCTYPE html>
<html lang="en">

<!DOCTYPE html> tells the browser "this is a modern HTML page." <html lang="en"> opens the container that holds the whole page and notes that it is written in English. Notice the angle brackets — that is how you write a tag. Most tags come in pairs: an opening <html> and a closing </html> with a slash, like a pair of brackets around everything in between.

2 · The head — backstage setup

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Concept Manipulative</title>
<style> ... </style>
</head>

Nothing here shows up in the page body, but it matters:

The words inside a tag like charset="UTF-8" are attributes — extra settings, written as name="value", that tell a tag how to behave.

3 · The style block — how it looks (CSS)

<style>
  body { font-family: sans-serif; max-width: 600px; margin: 40px auto; }
  h1 { font-size: 22px; }
  .bar { height: 28px; background: #3b82f6; border-radius: 6px; width: 50%; }
  .value { font-size: 18px; margin: 12px 0; }
</style>

This is CSS — the language for appearance. Each rule has two parts: a selector that says what to style, and a set of properties in { } that say how.

4 · The body — what the learner sees

<body>
  <h1>My Concept Manipulative</h1>
  <p>Drag the slider and watch what changes.</p>

  <!-- The control the learner interacts with -->
  <input type="range" id="slider" min="0" max="100" value="50">
  <div class="value">Value: <span id="out">50</span></div>

  <!-- The visual feedback -->
  <div class="bar" id="bar"></div>
</body>

This is the visible page, built from elements — a tag, its content, and its closing tag together:

5 · The script — what it does (JavaScript)

<script>
  // The core interaction: input -> update -> show feedback.
  var slider = document.getElementById("slider");
  var out = document.getElementById("out");
  var bar = document.getElementById("bar");

  slider.addEventListener("input", function () {
    out.textContent = slider.value;
    bar.style.width = slider.value + "%";
  });
</script>

This is JavaScript — the language for behavior, for making the page do something. Read it as three moves:

That loop — the learner acts, the page reads it, the page shows the result — is the heart of every manipulative. When you swap in your own concept, you are really just changing what gets read and what changes in response.

The terms, in one place

TermWhat it means
TagA word in angle brackets, like <p>. Usually paired with a closing tag </p>.
ElementAn opening tag, its content, and its closing tag together — one piece of the page.
AttributeA setting inside a tag, written name="value", e.g. id="bar" or type="range".
Head vs bodyHead = backstage setup the visitor never sees. Body = everything on the visible page.
id / className tags on an element. An id is unique (for the script to find); a class is a shared label (for styling).
HTMLThe structure — the parts of the page and how they nest.
CSSThe appearance — colors, sizes, spacing. Lives in <style>.
JavaScriptThe behavior — what happens when the learner interacts. Lives in <script>.
CommentA note for humans the browser ignores: <!-- --> in HTML, // in JavaScript.
Now you can read what the AI writes. You do not need to memorize this or write it from scratch. When your AI assistant hands you a more advanced file, you will recognize the head and body, spot the <style> and <script>, and know what to ask for: "make the bar green," "add a second slider," "show a message when the value passes 80." Knowing the basic structure is what lets you steer.

Build it here

This is your workbench. Write or paste your manipulative into the editor on the left and it runs live on the right — every change shows instantly, with no download needed. It autosaves in this browser as you go. When you want to share or ship it, download the file: it opens straight in any browser with no setup, and that downloaded file is your shipped capstone.

The code editor needs JavaScript enabled. You can still build your manipulative in any text editor and AI assistant.

Warm up: six small steps

The editor above starts with the slider-and-bar example. Before you build your own, work through these six steps — one at a time, changing only the highlighted part. For the first five, the box shows the file as it stands just before that step, next to its live output — make the highlighted edit right there in the box and watch the output change as you type (no scrolling back up). By the end of step 5 you will have turned a plain slider into a working conditional-probability manipulative. Then, in step 6, you hand it to an AI assistant and take it further — which is the real skill this whole course has been building toward.

Step 1 · Recolor the slider

Find the <style> block near the top of the file. The slider starts a plain gray — change its color by editing the #slider line:

#slider { accent-color: #ef4444; }  /* change the color */

That bright red (#ef4444) jumps out against the gray. Once it works, swap it for #22c55e (green) or #3b82f6 (blue). accent-color is the color of the slider itself; a hex code like #ef4444 is just a color written in code. Type the whole six-character hex before you stop — a half-typed code like #ef4 isn't a real color yet, so nothing will change until it's complete.

You should see: the slider — the round knob and the filled part of its track — change from gray to your color a moment after you stop typing. (The big rectangle below it is a separate piece called the bar; it stays as-is for now — you'll get to it later.)

Enable JavaScript to see this step running.

Step 2 · Make it about a real situation

Now give the page a job. In the <body>, find the heading and the line under it and change the words:

<h1>Chance of rain today</h1>
<p>Drag the slider to set how likely rain is.</p>

You are not changing what the code does yet — only what it says. The slider is now standing in for the chance of one real thing happening: rain.

You should see: the title and instruction now describe rain.

Enable JavaScript to see this step running.

Step 3 · Read the number as a chance

A probability is a percentage. Find the value line in the <body> and add a percent sign, and reword the label:

<div class="value">Chance of rain: <span id="out">50</span>%</div>

Now the slider reads as "Chance of rain: 50%". Same number, but it finally means something.

You should see: the readout now ends in a % sign as you drag.

Enable JavaScript to see this step running.

Step 4 · Add the condition — this is the whole idea

Conditional probability is what happens to a chance once you know something else. Add a checkbox the learner can tick, then replace your whole <script> so the chance reacts to it.

First, add these two lines in the <body>, just under the slider:

<label><input type="checkbox" id="cloudy"> I know the morning was cloudy</label>
<p id="explain"></p>

Then replace the whole <script> with this:

<script>
  var slider  = document.getElementById("slider");
  var out     = document.getElementById("out");
  var bar     = document.getElementById("bar");
  var cloudy  = document.getElementById("cloudy");   // the thing you now know
  var explain = document.getElementById("explain");

  function update() {
    var base  = Number(slider.value);                // chance of rain on its own
    var boost = 30;                              // how much "cloudy" raises it
    var chance = cloudy.checked ? Math.min(base + boost, 95) : base;

    out.textContent = chance;
    bar.style.width = chance + "%";
    explain.textContent =
      "On its own, rain is " + base + "%. Knowing it's cloudy, it's " +
      Math.min(base + boost, 95) + "%.";
  }

  slider.addEventListener("input", update);
  cloudy.addEventListener("change", update);
  update();
</script>

Tick the box. The chance jumps — the same rain, a different probability, because now you know it was cloudy. That gap is conditional probability. (The "+30 points, capped at 95%" rule is a deliberate simplification — real conditional probabilities combine in a subtler way, and knowing it was cloudy never makes rain a certainty, which is why the cap stops short of 100%.)

You should see: ticking "cloudy" changes the number, the bar, and the sentence below.

Enable JavaScript to see this step running.

Step 5 · Make the idea yours

Now experiment, so the concept really sticks:

When your own situation makes the chance visibly move the moment you change the condition, the hard part is done — by hand. There is one move left, and it is the most important one.

Your hand-built warm-up — the working conditional-probability manipulative:

Enable JavaScript to see this step running.

Step 6 · Now hand it to an AI assistant

You just built a working manipulative by hand. This last step is the real skill the whole course has been about: letting an AI assistant take your app further — while you stay in charge of it.

1. Copy your whole file from the editor above (click inside it, select all, copy).

2. Open any AI assistant — Claude, ChatGPT, and Gemini all work. Paste this prompt, then paste your code where it says:

I built a small web page that teaches one idea: conditional probability.
It is a single HTML file that runs in a browser. I am a beginner, so please:

1. Make ONE change at a time, and explain in plain English what you changed and why.
2. Keep everything in one HTML file that runs with no install.
3. Do not add anything I did not ask for.

The first change I want: add a "Reset" button that sets the slider back to 50
and unticks the checkbox.

Here is my current code:

[paste all of your code here]

3. Read the reply before you trust it. The AI is fast, but it is not always right — checking its work is your job, and the course taught you how:

Then ask for one more upgrade at a time, testing each in the preview before the next:

That loop — ask for one small thing, read what changed, test it, correct it — is exactly how you will build your real capstone above. You are not writing the code; you are steering it. That is what it means to build with AI.

Upload your project files

Your capstone is one HTML file — but if it pulls in extras (an image, a data file, a screenshot for your teacher), upload them all here so your whole project is in one place. Sign in first; only you and your teacher can see these files. Uploading hands your project straight to your teacher — a good way to submit a project you built outside the editor.

File upload needs JavaScript enabled. You can still Download .html above and submit from your student portal.

Track your progress

Tick each step as you finish it. Your progress is saved in this browser, so you can come back to it.

This checklist needs JavaScript enabled. The seven stages above are the checklist.

Definition of done

Your capstone is finished when all of these are true:

This concludes the course. You have learned what an AI assistant is, how to work with one, how to prompt and verify its output, and how to develop an idea into a deployed MVP — and you have applied these skills in practice. The same lifecycle scales from this single-file manipulative to a full production product.

← Previous: From Idea to a Working MVP← All Intro to AI lessons