
Coding Education
What Is a String in Programming?

Hafiz Rahman
Lead Coding Instructor at Algonova Malaysia

A string is a text data type in programming — a sequence of characters (letters, numbers, spaces, or symbols) written inside quotation marks, such as "Hello" or "Player123". Computers treat anything inside quotes as text to store or display, not as a number to do maths with.
How a String Works
When you type a name, message, or label into a program, the computer stores it as a string, keeping each character in order — so "cat" is three characters: c, a, and t. In Scratch, the green join block glues two strings together: join "Hi, " with a player's name to build a friendly greeting. In Python, a young coder writes player_name = "Aisha" and then print("Welcome, " + player_name), and the screen shows Welcome, Aisha. Here is one useful fact: a string can hold digits too, but "25" in quotes is text, so the computer will not add it like the number 25 until the value is converted.
Why It Matters for Kids
Strings are how programs talk to people — every game-score label, chat message, and menu button is made from them. Learning to handle text early gives children a foundation for building interactive projects, and it supports the problem-solving and computational-thinking goals in Malaysia's KSSR and STEM curriculum. Children in Algonova coding classes use strings from their very first Scratch game to name characters and print messages on screen. Understanding strings pairs naturally with knowing what a variable is, because a string is usually stored inside a variable.
Curious? A free trial lesson lets your child build their first talking program.

