Header_blog

Coding Education

5 min read

What Is a Prompt: How to Write Good Instructions for AI

Published: 11.08.2026·Updated: 11.08.2026
Bayu Nugraha

Bayu Nugraha

Children's Coding Specialist

What Is a Prompt: How to Write Good Instructions for AI

In programming, a variable is a named container that stores data, and the value inside it can change while the program runs. Like a labeled box, you can put a number or text inside, read it back later, or replace it with a new value at any time.

Table of Contents

How a Variable Works

Every variable has a name and a value. A programmer gives the variable a name and fills it with a value; the computer keeps that value in memory and can read it back whenever it is needed. Imagine a simple game: you create a variable called score and set it to 0 when the game starts. Each time the player collects a coin, the program runs score = score + 1, so the value changes from 0 to 1, 2, 3, and so on. In Scratch you do this with the "change score by 1" block; in Python it is a single line, score = score + 1. The stored value can be a number (a score of 10), text (a player name "Budi"), or a true/false value. The same variable can hold thousands of different values across one game.

What Are the Types of Variables?

Most programming languages sort variables by the kind of data they hold. The common types are numbers, split into whole numbers called integers and decimals; text, stored as a string; and true/false values called booleans. A game score is an integer, a player's name is a string, and "is the game over?" is a boolean. Some languages ask the child to state the type in advance, while beginner-friendly ones like Python and Scratch work it out on their own. Knowing the type matters because it decides what you can do with the value: you can add integers, but adding two strings just joins them.

Why It Matters for Kids

Understanding variables is the first step in thinking like a programmer: breaking a problem into data that can be stored, read, and changed. The concept appears in almost every programming language, from Scratch to Python, so once a child masters it, they can start building their own games, animations, and apps. In the Algonova coding course, kids learn variables through real projects they can play right away, not by memorizing terms.

Want your child to try building their own score game? Join a free coding class and see how variables work firsthand.