Build a quiz game
Make a real quiz game in one file, change it by asking, check its facts, and learn the habits to keep.

- Time
- About 35 minutes
- You do not need
- No coding.
- You need
- Claude Code from chapter 7 with the account holder at the keyboard, or the free route: any chat AI you are allowed to use and a plain text editor. A web browser.
- You will be able to
- Build a small game by describing it.
- Check and fix what the AI made.
- Undo a change you do not like.
You need a computer for the real steps. The practice screen works here.
What you will make
A quiz game. One file. It opens with a double-click, in the browser you already have. It is about a topic you choose.
You will not write the code. You will describe the game, read what the AI wants to do, try the result, and fix what is wrong. That is the real skill, and it works with every AI tool.
There are two ways to do it. Both make the same game.
With Claude Code
The AI makes and changes the file for you, and asks first. This needs the paid plan from chapter 7, held by someone 18 or over, and that person at the keyboard with you. “The free claude.ai plan does not include Claude Code access.”
The free route
Any chat AI you are allowed to use, plus the simple text editor on your computer. You copy the file across yourself. It works on a school Chromebook too. Chapter 2 lists the tools, their age rules and the free options.
Watch the whole build
Here is the whole chapter in ten steps. The page on the right is a real little quiz, so you can click it. Watch for step 6: the AI gets a fact wrong, and you catch it.
Step 1 of 10
Give the game its own folder, go into it, and start Claude Code there.
A practice screen. Nothing runs on your computer. The wrong answer in question 3 is there on purpose.
No file yet.
A practice screen. Nothing runs on your computer. The wrong answer in question 3 is there on purpose.
Step 1 of 10. Give the game its own folder, go into it, and start Claude Code there.
You type: mkdir my-quizYou type: cd my-quizYou type: claudeClaude Code asks whether you trust this folder. You made it, so you say yes.Step 2 of 10. Make it ask before it changes anything.
You press ShiftTab⏸ manual mode onStep 3 of 10. Describe the game: what it is, how it should work, and when it is finished.
You type to Claude Code: Make a quiz game in one file called index.html. Five multiple-choice questions about the planets. Show one question at a time, tell me if I was right, and show my score at the end. No outside libraries.AII will make one file, index.html, with five questions about the planets, one on screen at a time, and a score at the end.
Example. Your wording will differ.Step 4 of 10. It shows the file it wants to make and waits. Read the first lines, then say yes.
Claude wants to create index.html. Do you want to allow it?
You choose: Yes
Example. The real question will be worded differently.AIThe file is made. Double-click index.html in your my-quiz folder to play.
Example. Your wording will differ.Step 5 of 10. Open the file. Double-click index.html in your my-quiz folder.
You double-click index.html. It opens in your browser.Step 6 of 10. Play it, then check two answers somewhere you trust. Question 3 is wrong.
You play the game. Question 3 says the hottest planet is Mercury. You look it up on NASA's site: it is Venus.You type to Claude Code: Question 3 is wrong. The hottest planet is Venus, not Mercury. Fix it.Claude wants to edit index.html. Do you want to allow it?
You choose: Yes
Example. The real question will be worded differently.You refresh the browser tab. Question 3 now accepts Venus.Step 7 of 10. Change one thing at a time, then look.
You type to Claude Code: Make the buttons bigger and add a "Play again" button.Claude wants to edit index.html. Do you want to allow it?
You choose: Yes
Example. The real question will be worded differently.You refresh the browser tab. Play to the end to find the new button.Step 8 of 10. Ask it to teach you how one part works.
You type to Claude Code: Explain what the score part of the code does, as if I am 13.AIThe game keeps a number called score. It starts at 0. Each time you pick the right answer, it adds 1. At the end it shows that number out of 5.
Example. Your wording will differ.Step 9 of 10. Try a change you might not like.
You type to Claude Code: Make the whole page bright pink.Claude wants to edit index.html. Do you want to allow it?
You choose: Yes
Example. The real question will be worded differently.You refresh the browser tab. That is a lot of pink.Step 10 of 10. Undo it. The file goes back to how it was. Then leave.
You press EscthenEscThe rewind menu lists what you asked. You pick the pink ask and choose Restore code. You refresh: the pink is gone.You type to Claude Code: /exit
Why that ask works
A vague ask
Make a quiz.
A clear ask
what done when No outside libraries.
A vague ask
Make a quiz.
A clear ask
Make a quiz game in one file called index.html. Five multiple-choice questions about the planets. Show one question at a time, tell me if I was right, and show my score at the end. No outside libraries.
Why this is better
- It names the thing and the file, so you know exactly what to look for afterwards.
- It says how the game should behave, so you can test each part.
- It ends with “No outside libraries”, which means the game needs nothing but that one file.
Swap “the planets” for your own topic. Keep the rest. Chapter 4 has more on asking well.
The ask
You will use it on both routes.
Make a quiz game in one file called index.html. Five multiple-choice questions about the planets. Show one question at a time, tell me if I was right, and show my score at the end. No outside libraries.On the free route, add this
A chat AI cannot save a file for you. This gets you the whole file in one piece to copy.
Give me the whole file in one block.
Route A: build it with Claude Code
For this route you need Claude Code set up and the account holder at the keyboard with you. Small projects like this use a little of the plan's allowance. No account, or under 18? Skip to Route B.
With Claude Code
Open your terminal.
The same window as in chapter 6. It starts in your home folder, which is a fine place for this.
Make a folder for the game.
In your terminal
mkdir my-quizWhat you should see
Mac, Linux and Chromebook
Nothing at all. In a terminal, no message usually means it worked.
I see something elseWindows
PowerShell prints a few lines that name the new folder. The older CMD window prints nothing.
Go into the folder.
In your terminal
cd my-quizStart Claude Code.
It asks whether you trust this folder. You made it one minute ago and it is empty, so say yes.
In your terminal
claudeWhat you should see
I see something elseThe Claude Code prompt, with your
my-quizfolder shown above it.Switch to the mode that asks first.
Read the line under the prompt first. If it already says manual mode on, leave it. If not, press ShiftTab and read it again. Keep going until it says manual mode on, then stop. In this mode, “Claude Code stops and asks you before most actions that edit files, run shell commands, or reach the network.”
Ask for the game.
Change “the planets” to your topic first, if you like.
Type this and press Enter.
Inside Claude Code
Make a quiz game in one file called index.html. Five multiple-choice questions about the planets. Show one question at a time, tell me if I was right, and show my score at the end. No outside libraries.What you should see
I see something elseA short plan in plain words. Then it shows the file it wants to make, and waits for you.
Read what it wants to do, then say yes.
Look at the file name. It should be
index.html, insidemy-quiz. Skim the first lines. You do not need to understand them all. Then “pressEnterto choose Yes”. If something looks odd, choose no and ask it why.What you should see
I see something elseA message that the file was made, and often a tip on how to open it.
Open the game.
Mac
Open Finder and find the
my-quizfolder. It is in your home folder. Then do what the official guide says: “Once Claude creates the files, double-click the HTML file to open it in your browser.”Windows
Open File Explorer and find the
my-quizfolder. It is in the folder with your user name. Then do what the official guide says: “Once Claude creates the files, double-click the HTML file to open it in your browser.”Linux and Chromebook
Open your files app and find the
my-quizfolder. It is in your home folder. Then do what the official guide says: “Once Claude creates the files, double-click the HTML file to open it in your browser.”What you should see
I see something elseA browser tab with your first question. Play it to the end and look at your score.
Check two answers yourself.
This step matters most. Pick two questions and look up the answers in a book or on a site you trust. An AI writes what sounds likely, and that is not always what is true. If one is wrong, tell it the right answer, the way the line below does. Approve the edit, then refresh the browser tab.
Change the question number and the answer to fit yours.
Inside Claude Code
Question 3 is wrong. The answer should be Venus. Fix it.What you should see
I see something elseIt asks to edit
index.html. After you say yes and refresh the tab, the game accepts the right answer.Change one thing.
One small change at a time. Then refresh the tab and look. If you ask for five things at once, you cannot tell which one broke the game.
Inside Claude Code
Make the buttons bigger and add a "Play again" button.What you should see
I see something elseBigger answer buttons, and a Play again button after your score.
Ask it to teach you.
You can ask about any part of the file. This is how the game slowly becomes yours.
Inside Claude Code
Explain what the score part of the code does, as if I am 13.What you should see
I see something elseA short explanation in plain words. It does not change the file. If a word is new to you, ask what it means.
Undo a change you do not like.
Ask for something silly first, such as a bright pink page, and approve it. Now take it back. With nothing typed at the prompt, press Esc twice. A menu lists what you asked. Use the arrow keys to pick the ask you want to take back, press Enter, and choose Restore code. Never mind backs out without changing anything.
Typing this opens the same menu.
Inside Claude Code
/rewindWhat you should see
I see something elseAfter Restore code, refresh the tab. The game looks as it did before that ask.
Finish for today.
Inside Claude Code
/exitWhat you should see
I see something elseYour normal terminal line. The game is still in the folder and still opens with a double-click.
Coming back another day? Open a terminal, run cd my-quiz, then run this. It picks up where you left off.
In your terminal
claude -cWhat you should see
Claude Code opens with your last conversation in this folder. Read the line under the prompt again. If it does not say manual mode on, press ShiftTab until it does.

Route B: build it for free
This works on any computer with a browser, a school Chromebook included. Nothing to install. Use a chat AI you are allowed to use: each one has an age rule, and chapter 2 lists them. If you are under 18, ask a parent or teacher first.
The free route
Open your chat AI and start a new chat.
The one you picked in chapter 2. A new chat means it starts with a clean sheet.
Ask for the game, in one block.
Copy this into the chat box. Put your topic in place of “the planets”, then send it. The last sentence is there so you get one whole file to copy.
In the chat box
Make a quiz game in one file called index.html. Five multiple-choice questions about the planets. Show one question at a time, tell me if I was right, and show my score at the end. No outside libraries. Give me the whole file in one block.What you should see
I see something elseA box of code that starts with
<!DOCTYPE html>and ends with</html>. Capital or small letters are both fine.Copy the whole block.
If the block has its own copy button, use it. If not, select everything from the first line of code to
</html>and copy it. Leave out the chat's own sentences above and below.Paste it into a plain text editor and save it as index.html.
Mac
Open TextEdit. Choose File, then New. Choose Format, then Make Plain Text. Paste. Choose File, then Save, and name it
index.html. When it asks which ending to use, click Use .html. These are Apple's own steps (opens in a new tab).Windows
Open Notepad from the Start menu. Paste. Choose File, then Save as. In the Save as type box, select All files. If you leave it on Text Documents, Notepad adds
.txtto the name. Type the full nameindex.htmland save it in a new folder calledmy-quiz. The Save as type step is from a Microsoft page (opens in a new tab). It is an older page, so a menu may be worded a little differently on your version.Linux
Use the simple text editor that came with your computer. Paste, then save with the name
index.html. We did not check the exact menu names for your system, so ask an adult if you cannot find them.Chromebook
Open the Text app from the Launcher. Paste. Press CtrlS. At the bottom, type the name
index.html. On the left, choose where to keep it, then select Save. The save steps are from Google's help page (opens in a new tab), and its shortcut list (opens in a new tab) names the Text app. We did not check that every Chromebook has that app. If yours does not, ask an adult which plain text editor to use.What you should see
I see something elseA file called
index.htmlin a place you can find again, such as a new folder calledmy-quiz. Its icon looks like your browser's icon, not a page of text. If it opens as text, its name really ends in.txt: see If something goes wrong.Double-click index.html.
What you should see
I see something elseA browser tab with your first question. If you see code instead, look at If something goes wrong.
Check two answers yourself.
Look them up in a book or on a site you trust. If one is wrong, go back to the same chat, tell it the right answer, and add:
Give me the whole file again in one block.Then replace everything in your file with the new block, save, and refresh the browser tab.Change one thing, the same way.
Ask for one change, ask for the whole file again, replace, save, refresh. Try:
Make the buttons bigger and add a "Play again" button.What you should see
I see something elseBigger answer buttons, and a Play again button after your score.
Ask it to teach you.
In the same chat, type:
Explain what the score part of the code does, as if I am 13.What you should see
I see something elseA short explanation in plain words. Your file stays as it is.
Make it yours
Four ideas for next time. Each is one ask. On the free route, add the sentence about the whole file.
A timer
Adds a little pressure. Check that it really counts a slow answer as wrong.
Add a 15 second timer to each question. If time runs out, count it as wrong.Your own questions
Write five questions and answers yourself. Then you know every fact is right.
Replace the five questions with these five. I will paste them next.A colour theme
Ask for the look you want. If you do not like it, undo it.
Give the page a calm colour theme with dark text on a light background.A quiz for a friend
A second file beside the first one. Pick their favourite topic.
Make a second file called friend.html with the same game and five new questions about volcanoes.
Ten habits to keep
Commands you now know
| Type this | What it does | Where |
|---|---|---|
claude | Starts Claude Code in the folder you are in. | Terminal |
claude -c | Carries on with the last conversation in this folder. | Terminal |
claude --version | Prints the version number. | Terminal |
/help | Lists the commands. | Claude Code |
/clear | Starts a new conversation with an empty sheet. | Claude Code |
/rewind | Opens the rewind menu, to take changes back. | Claude Code |
/usage | Shows how much of the plan's allowance is used. | Claude Code |
/exit | Leaves Claude Code. | Claude Code |
If something goes wrong
The file name must end in
.html. If it ends in.txt, the computer treats it as plain writing. Rename it toindex.html.With Claude Code you can also ask:
Is index.html a complete web page? Fix it if not.Windows may be hiding the real ending, so the file could be
index.html.txt. Make the endings visible, then rename the file.On Windows 11: in File Explorer, select View, then Show, then File name extensions. On Windows 10: under View, tick the File name extensions box. These are Microsoft's own steps (opens in a new tab).
The document was not plain text when you pasted. Start again: File, then New, then Format, then Make Plain Text, and paste after that.
Refresh the browser tab. The tab shows the file as it was when you opened it.
With Claude Code, check that you chose yes when it asked to edit. On the free route, check that you replaced the whole file and saved it.
With Claude Code: press Esc twice on an empty prompt, pick that ask, and choose Restore code. Then ask again for one change only, and say what must stay the same.
On the free route: go back to your saved copy, or ask for the whole file again and say what must stay the same.
That happens with every AI tool. It writes what sounds likely. Tell it the right answer and where you found it, and ask it to fix that one question.
Chapter 5 has more on checking.
That choice only shows when Claude Code changed a file after the ask you picked. Pick a different ask in the list, or choose Never mind to back out.
Paid plans have limits too. The help page says: “Pro plans have a five-hour limit and a weekly usage limit that applies across all models.”
Type
/usageto see where you are, then wait for the limit to reset. Your game is safe in its folder.On the free route, free chat tools also limit how much you can use. Wait, or carry on tomorrow.
Nothing is lost. Open a terminal, run
cd my-quiz, thenclaude -c.Choose no. Then ask:
Explain what that command does before you run it.A one-file quiz game should not need many commands. If it still seems odd, ask the account holder to look with you.
Ask it:
Put everything into the one file index.html and remove the other files.Read what it wants to remove before you say yes.Open a normal terminal window, run
cd my-quiz, thenpwd. It prints the full address of the folder. Follow that address in your files app.In the old CMD window on Windows, type
cdon its own instead ofpwd.
Chapter 8
Check yourself
Question 1 of 6
Claude Code asks to change your file. What do you do before choosing yes?
Claude Code asks to change your file. What do you do before choosing yes?
- Read what it will change.
- Press Enter quickly.
Show the answer
Read what it will change. You are the one who approves it, so look first. The file name and the first lines are enough to start with.
Your quiz says the Sun is a planet. Whose job is it to catch that?
- The AI's.
- Yours.
Show the answer
Yours. You are publishing the quiz, so you check it. Two answers in a second place is a good start.
You do not like the last change Claude Code made. How do you go back?
- Press Esc twice, or type
/rewind. - Close the laptop.
- Delete the folder.
Show the answer
Press Esc twice, or type
/rewind. Both open the rewind menu. Pick the ask and choose Restore code.- Press Esc twice, or type
How do you pick up yesterday's conversation in the same folder?
claude --versionclaude -c
Show the answer
claude -cIt continues the most recent conversation in the folder you are in.Put one round of building in order.
Show the answer
Ask for one change, Read what it wants to do, Say yes, Refresh the page and look. Ask, read, approve, look. Then go round again with the next small change.
You are starting a different project. Which is the good habit?
- Keep going in the same conversation.
- A new folder and a new conversation.
Show the answer
A new folder and a new conversation. A new folder keeps the files apart. A new conversation starts with an empty sheet.
You built something
It is a real file, on your computer, and it works without the AI. Show someone. Let them play it, and tell them which fact you had to fix.
That is the whole guide. You know how these tools work, how to ask, how to check, and how to stay in charge.
Where to go next
How large language models work
Our topic page on what is going on inside the AI you just used.
The slide decks
Short decks with moving diagrams. Good for a class or a club.
Computer science
Learn to read the code it wrote for you.
A bigger project
The official guide suggests starting a new idea with a question, not an order. Try it in a new folder.
I want to build a personal budget tracker. What would I need?When you are ready: project notes
Inside Claude Code,
/initmakes a file calledCLAUDE.md. It is “a markdown file you add to your project root that Claude Code reads at the start of every session.” Use it for rules such as “keep everything in one file”.Official lessons
Anthropic has a quickstart (opens in a new tab), a page of common workflows (opens in a new tab) and a course, Claude Code 101 (opens in a new tab), which needs a paid Claude account.
What you learned
- 1You can build a small working game by describing it clearly, one change at a time.
- 2The AI can get facts wrong. Reading before you say yes, and checking afterwards, is your job.
- 3Esc twice or /rewind takes a file change back. claude -c picks up where you left off.
Where this comes from
Checked on November 25, 2026.
- Anthropic
- Terminal guide for new users (opens in a new tab)
- Claude Code quickstart (opens in a new tab)
- Checkpointing (opens in a new tab)
- Choose a permission mode (opens in a new tab)
- Commands (opens in a new tab)
- CLI reference (opens in a new tab)
- Interactive mode (opens in a new tab)
- How Claude Code works (opens in a new tab)
- Security (opens in a new tab)
- Manage costs (opens in a new tab)
- What is the Pro plan? (opens in a new tab)
- Claude Academy: Claude Code 101 (opens in a new tab)
- Common workflows (opens in a new tab)
- MLA Style Center
- Microsoft
Seen something that has changed? Tell us: