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
Text Variable User Navigation Functions in SequenceStudent 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 (though you'll need to come up with another variable)!.
Interactive Project Example for Students
Play through this lesson's example project created on Elementari. Use this example to guide and motivate your students.
Standards
CSTA K-12 Computer Science Standards (2017)
Algorithms & Programming
1B-AP-10 - Create programs that include sequences, events, loops, and conditionals.
1B-AP-11 - Decompose (break down) problems into smaller, manageable subproblems to facilitate the program development process.
1B-AP-12 - Modify, remix, or incorporate portions of an existing program into one's own work, to develop something new or add more advanced features.
1B-AP-15 - Test and debug (identify and fix errors) a program or algorithm to ensure it runs as intended.
2-AP-10 - Use flowcharts and/or pseudocode to address complex problems as algorithms.
2-AP-13 - Decompose problems and subproblems into parts to facilitate the design, implementation, and review of programs.
2-AP-17 - Systematically test and refine programs using a range of test cases.
ISTE Student Standards
Creative Communicator
6b - Students create original works or responsibly repurpose or remix digital resources into new creations.
6d - Students publish or present content that customizes the message and medium for their intended audiences.
6c - Students communicate complex ideas clearly and effectively by creating or using a variety of digital objects such as visualizations, models or simulations.
Computational Thinker
5a - Students formulate problem definitions suited for technology-assisted methods such as data analysis, abstract models and algorithmic thinking in exploring and finding solutions.
Innovative Designer
4a - Students know and use a deliberate design process for generating ideas, testing theories, creating innovative artifacts or solving authentic problems.
4d - Students exhibit a tolerance for ambiguity, perseverance and the capacity to work with open-ended problems.
4c - Students develop, test and refine prototypes as part of a cyclical design process.
4b - Students select and use digital tools to plan and manage a design process that considers design constraints and calculated risks.
AASL Standards
Inquire
I.A.2 - Recalling prior and background knowledge as context for new meaning
I.B.3 - Generating products that illustrate learning.
I.C.4 - Sharing products with an authentic audience.