Introduction
In this quick Hour of Code project, students become game designers. They write a short, fun thank-you message for a teacher, then code two text variables to let the teacher personalize the message. The final message uses player inputs to change each time — combining thoughtful tone with basic coding logic.
Objectives
Students will:
- Write a short thank-you message (3–4 sentences) with a clear tone.
- Use descriptive vocabulary to make it warm, funny, or dramatic.
- Ask clear prompts so the teacher’s inputs always make sense.
- Code two text variables ({{name}} and {{fun_detail}}) using On Text Input and Variable blocks.
- Test the message with silly or unexpected inputs to check tone and flow.
Code Stories and Games with Elementari
In this project, students learn how text variables work in real digital tools: they collect user input (like a teacher’s name or favorite snack) and display it naturally in a short message. By coding variables instead of typing them manually, students see how personalization works behind the scenes — and how even a tiny piece of code can change tone and meaning in fun ways. It’s a perfect introduction to combining audience, word choice, and coding logic.
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 write a short thank-you message and make it interactive using two player inputs and text variables.
Before Coding:
- Use the Pre-Writing Organizer to plan prompts, tone, and final lines.
- Model the Example Project so students see how the blanks appear naturally in the message.
- Show how to write short, clear prompts that always work with the message.
After Building:
- Students test the message with silly or surprising inputs.
- Use the Peer Review and Single Point Rubric to guide feedback and final grading.
- Encourage students to add text effects, emojis, or a fun sign-off to make it personal.
Lesson Resources
Coding Concepts Covered
Function in Parallel User Input Field Text Variable User NavigationStudent Instructions
Use your Writing Organizer to help plan.
- Pick a tone: heartfelt, sweet, cheesy, dramatic, or playful.
- Circle 1–2 words from the Tone Vocabulary Bank to use in your lines.
Play the Example Project
Decide what you’ll ask your teacher and add two textfield boxes to your page.
Code Overview: Use the Create Text Variables
block to create and name two variables (ex. name and fun_detail).
Use the Create Text Variables
block to make and name your variable (name).
Use On Text Input
and Variable = Text Object
blocks to save what the player types into that variable.
Now do the same steps for your second textfield and variable (fun_detail).
Write 3–4 sentences using both blanks. Place curly brackets around the variables like {{name}} and {{fun_detail}}.
Use a vocab from the Tone Vocabulary Bank.
Add characters, backgrounds, and props.
🎮Code some silly animations or music if you have time.
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
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.
3A-AP-13 - Create prototypes that use algorithms to solve computational problems by leveraging prior student knowledge and personal interests.
3A-AP-16 - Design and iteratively develop computational artifacts for practical intent, personal expression, or to address a societal issue by using events to initiate instructions.
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.