Introduction
In this fun mini coding lesson, students become quiz game designers! They write one silly quiz question, create two answer buttons, and code a text variable that stores the player’s result. They design a page, add visuals, and test their quiz with different choices — combining simple writing, logic, and interactive design.
Objectives
Students will:
- Write a simple quiz question for a personality result.
- Create two clear answers and set a text variable for each.
- Code buttons using Variable = Value blocks to store the player’s choice.
- Design a short final message that uses their variable with curly brackets.
- Test the quiz with silly answers to make sure it works and is fun!
Code Stories and Games with Elementari
Elementari helps students personalize simple stories and games with basic coding. In this project, students collect answers through buttons, store the player’s choice as a text variable, and reveal a result that feels personal every time. By building a quiz with clear prompts, fun visuals, and interactive logic, they see how even simple code can make writing more playful and unique.
New to Elementari? Click on the orange Start button to jump right into the lesson for free. Check out our Getting Started Guide for an overview of how Elementari works with your class. Get started for free for up to 35 student accounts.
Teacher Notes
In this lesson, students plan and build a mini personality quiz that personalizes a final message with a text variable.
Before Coding:
- Have students complete the Pre-Writing Organizer to plan their quiz question, answers, and final message.
- Show the Example Project so students see how buttons and variables personalize the result.
- Model a quick, silly quiz to get everyone started.
After Building:
- Have students test both answers to check that the correct result always shows.
- Use the Peer Review and Single-Point Rubric for quick, supportive feedback.
- Encourage students to add fun visuals, characters, or simple sound effects if they have time.
Lesson Resources
Coding Concepts Covered
Functions in Sequence Text Variable User NavigationStudent Instructions
Use your Writing Organizer to help plan.
- Write one fun question with two answers buttons.
- Decide what each button sets the variable to.
- Plan the final short message that uses the variable.
Play the Example Project
Write one fun question. Choose 2 answer buttons.
Code Overview: Use the Create Text Variables
block to create and name one variable.
Use
blocks so each button sets the variable correctly.Variable = Value
Now code the second button. When you click the second button, it should set the text variable to a new word or short sentence
Write 1–2 lines that use your variable. Put curly brackets around the variables like {{friend_type}}.
Add characters, backgrounds, and props.
🎮Code some silly animations or music if you have time.
If you want to add another question, you can duplicate the page. This will copy all your code!
Interactive Project Example for Students
Play through this lesson's example project created on Elementari. Use this example to guide and motivate your students.