Build Your Own Trivia Game in Scratch With Free Gemini
A weekend project where the child writes the questions and codes the scoring, and a free AI plays idea partner. Teaches real programming logic disguised as play.
What matters today
A weekend project where the child writes the questions and codes the scoring, and a free AI plays idea partner. Teaches real programming logic disguised as play.
Key points
- What the Child Builds
- Step 1: Write the Questions
- Step 2: Use Free Gemini as a Design Partner
- Step 3: Build the Logic in Scratch
- Action Steps Summary
A weekend project where the child writes the questions and codes the scoring, and a free AI plays idea partner. Teaches real programming logic disguised as play.
What You Will Learn
- A 1 to 2 hour project for ages 8 to 16 that needs only a browser and two free tools
- How your child moves from playing trivia to designing and coding it
- Where free Gemini helps as a brainstorming partner and where the child stays in charge
- The core programming idea your child practices: checking input against a rule, then acting on the result
Most children will happily answer trivia questions for an hour. Far fewer have ever written the questions, decided the points, and built the screen that announces the score. This project flips the table. The child stops being the contestant and becomes the game designer and the programmer who makes the buzzer work.
The work happens in two free tools that run in any browser: Scratch at scratch.mit.edu and a free Gemini account. The child picks the topic, writes the questions, and builds the scoring code. Gemini acts as an idea partner, suggesting one tricky wrong answer per question and sketching a cartoon mascot. The child decides which suggestions are fair and which to throw out. The writing and the code stay with the child.
This is a PromptHacker Premium deep dive.
The full build guide, the exact Gemini prompt, and the parent sidebar are below for subscribers.
What the Child Builds
The finished project is a clickable quiz game with three parts. A start screen greets the player and waits for a click to begin. A question loop runs through 8 to 10 questions one at a time, takes the typed answer, and adds a point for each correct response. A final score screen shows the total and a friendly message. The cartoon mascot the child designs with Gemini can appear on the start and end screens.
Everything runs inside Scratch, so the child can share the game with a friend or a grandparent by sending one link. No installs, no paid subscriptions, no special hardware. A laptop, a tablet, or a desktop with a browser is enough.
Step 1: Write the Questions
The project starts on paper, not on screen. The child picks one topic they already know well: a favorite video game, planets, dinosaurs, a sports team, or a book series. A narrow topic produces better questions than a broad one.
Then the child writes 8 to 10 questions, each with a single clear correct answer, in two columns: the question on the left and the answer on the right. Keep the answers short, ideally one or two words, because the player will type them and the code checks for an exact match. Writing the answers first makes the next step much easier.
Step 2: Use Free Gemini as a Design Partner
A great trivia game needs tempting wrong answers, and a mascot makes it feel like a real game. This is where free Gemini earns its place. The child opens Gemini, pastes the questions and answers into the prompt below, and reads what comes back.
The Prompt (for Gemini)
I am making a trivia game about [topic] for kids my age. Here are my questions and answers: [paste]. For each one, suggest a single believable but wrong answer to make it tricky, and explain in one line why the real answer is right. Then describe a friendly cartoon mascot I could draw for the game.
The child reads each suggestion and judges it. Some tricky answers will be fair and clever. Others will be too obvious or simply wrong, and the child crosses those out. This judgment is the point: the AI proposes, the child decides. The mascot description becomes a drawing the child makes in the Scratch costume editor.
Step 3: Build the Logic in Scratch
Now the child becomes the programmer. In Scratch, a sprite (the mascot) runs a short script. The build follows a clear pattern, one block group at a time.
- Make a variable called score and set it to 0 when the green flag is clicked.
- Show a start screen: the sprite says a welcome line and uses ask and wait with "Type start to begin".
- For each question, use the ask and wait block to show the question and capture the typed answer.
- Use an if block to check whether the answer equals the correct answer. If it matches, change score by 1 .
- Repeat that question and check pattern for all 8 to 10 questions.
- At the end, the sprite says "Your score is" joined with the score variable, and shows the final score screen.
The same three blocks, ask and wait, if to check the answer, and change score by 1, repeat for every question. Once the child builds the first question, the rest are copies with new text. That repetition is what makes the project finishable in an afternoon.
For Parents and Educators
The core idea your child practices is conditional logic: take an input, compare it against a rule, then act on the result. Checking a typed answer and adding a point is the same pattern that runs behind login screens, spell checkers, and game scoring everywhere. The child also learns that an AI is a partner that suggests ideas, not an authority that decides for them.
Conversation starters: Which wrong answer that Gemini suggested did you decide was unfair, and why? What would happen in your code if someone typed the right answer but with a capital letter? If you could add one new question to make the game harder, what would it be?
Action Steps Summary
- Pick a topic and write on paper. Choose one subject the child knows well, then write 8 to 10 questions with short, one or two word answers in two columns.
- Brainstorm with free Gemini. Paste the questions and answers into the prompt to get one tricky wrong answer per question and a mascot description.
- Keep the child as judge. Have the child cross out any wrong answer that is unfair or too obvious before using it.
- Build the logic in Scratch. Set a score variable, then repeat the ask and wait, if to check, and change score pattern for each question.
- Add screens and share. Build a start screen and a final score screen, draw the mascot in the costume editor, then share the game link with a friend or family member.
Three deep dives. Four useful moves. One email worth opening.
PromptHacker turns the AI firehose into practical next steps for work, health, family, and everything time keeps trying to steal.