Skip to content

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.

About 35 minutes. No coding.

Students observe headset tracking, controllers, and basic navigation.
XR Intro to Immersive Simulation
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.

Your computer

Pick yours once. Every command and key on this page, and on the other chapters, changes to match. It is remembered in this browser only.

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.

Practice screen
You type: mkdir my-quiz
You type: cd my-quiz
You type: claude
Claude Code asks whether you trust this folder. You made it, so you say yes.

A practice screen. Nothing runs on your computer. The wrong answer in question 3 is there on purpose.

index.html, opened in a browser

No file yet.

A practice screen. Nothing runs on your computer. The wrong answer in question 3 is there on purpose.

  1. Step 1 of 10. Give the game its own folder, go into it, and start Claude Code there.

    You type: mkdir my-quiz
    You type: cd my-quiz
    You type: claude
    Claude Code asks whether you trust this folder. You made it, so you say yes.
  2. Step 2 of 10. Make it ask before it changes anything.

    You press ShiftTab
    ⏸ manual mode on
  3. Step 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.
    AI

    I 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.
  4. 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.
    AI

    The file is made. Double-click index.html in your my-quiz folder to play.

    Example. Your wording will differ.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
    AI

    The 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.
  9. 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.
  10. Step 10 of 10. Undo it. The file goes back to how it was. Then leave.

    You press EscthenEsc
    The 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.

Add what is missing

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

  1. Open your terminal.

    The same window as in chapter 6. It starts in your home folder, which is a fine place for this.

  2. Make a folder for the game.

    In your terminal

    mkdir my-quiz

    What you should see

    Mac, Linux and Chromebook

    Nothing at all. In a terminal, no message usually means it worked.

    Windows

    PowerShell prints a few lines that name the new folder. The older CMD window prints nothing.

    I see something else
  3. Go into the folder.

    In your terminal

    cd my-quiz

    What you should see

    The line you type on now shows my-quiz.

    I see something else
  4. Start 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

    claude

    What you should see

    The Claude Code prompt, with your my-quiz folder shown above it.

    I see something else
  5. 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.”

    What you should see

    ⏸ manual mode on

    I see something else
  6. 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

    A short plan in plain words. Then it shows the file it wants to make, and waits for you.

    I see something else
  7. Read what it wants to do, then say yes.

    Look at the file name. It should be index.html, inside my-quiz. Skim the first lines. You do not need to understand them all. Then “press Enter to choose Yes”. If something looks odd, choose no and ask it why.

    What you should see

    A message that the file was made, and often a tip on how to open it.

    I see something else
  8. Open the game.

    Mac

    Open Finder and find the my-quiz folder. 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-quiz folder. 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-quiz folder. 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

    A browser tab with your first question. Play it to the end and look at your score.

    I see something else
  9. 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

    It asks to edit index.html. After you say yes and refresh the tab, the game accepts the right answer.

    I see something else
  10. 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

    Bigger answer buttons, and a Play again button after your score.

    I see something else
  11. 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

    A short explanation in plain words. It does not change the file. If a word is new to you, ask what it means.

    I see something else
  12. 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

    /rewind

    What you should see

    After Restore code, refresh the tab. The game looks as it did before that ask.

    I see something else
  13. Finish for today.

    Inside Claude Code

    /exit

    What you should see

    Your normal terminal line. The game is still in the folder and still opens with a double-click.

    I see something else

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 -c

What 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.

I see something else
College of Engineering visit with external partners and mentors to plan youth and reliability activities.
Campus Partnership Visit

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

  1. 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.

  2. 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

    A box of code that starts with <!DOCTYPE html> and ends with </html>. Capital or small letters are both fine.

    I see something else
  3. 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.

  4. 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 .txt to the name. Type the full name index.html and save it in a new folder called my-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

    A file called index.html in a place you can find again, such as a new folder called my-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.

    I see something else
  5. Double-click index.html.

    What you should see

    A browser tab with your first question. If you see code instead, look at If something goes wrong.

    I see something else
  6. 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.

    What you should see

    The game now accepts the right answer.

    I see something else
  7. 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

    Bigger answer buttons, and a Play again button after your score.

    I see something else
  8. 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

    A short explanation in plain words. Your file stays as it is.

    I see something else

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

0 of 10 ticked. Saved in this browser only.

Commands you now know

Type thisWhat it doesWhere
claudeStarts Claude Code in the folder you are in.Terminal
claude -cCarries on with the last conversation in this folder.Terminal
claude --versionPrints the version number.Terminal
/helpLists the commands.Claude Code
/clearStarts a new conversation with an empty sheet.Claude Code
/rewindOpens the rewind menu, to take changes back.Claude Code
/usageShows how much of the plan's allowance is used.Claude Code
/exitLeaves Claude Code.Claude Code

All of these, and the keys, fit on one page: print the cheat sheet.

Source: the official page (opens in a new tab)

If something goes wrong

Nothing you type here is sent anywhere.

Chapter 8

Check yourself

Question 1 of 6

Claude Code asks to change your file. What do you do before choosing yes?

  1. 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.

  2. 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.

  3. 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.

  4. How do you pick up yesterday's conversation in the same folder?

    • claude --version
    • claude -c
    Show the answer

    claude -c It continues the most recent conversation in the folder you are in.

  5. 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.

  6. 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, /init makes a file called CLAUDE.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

  1. 1You can build a small working game by describing it clearly, one change at a time.
  2. 2The AI can get facts wrong. Reading before you say yes, and checking afterwards, is your job.
  3. 3Esc twice or /rewind takes a file change back. claude -c picks up where you left off.

Saved in this browser only.

Where this comes from

Checked on November 25, 2026.

Tools, prices and rules change. These are the official pages we read on that day. If a page and this guide disagree, trust the page.

Seen something that has changed? Tell us: