Surprise Button
Illustration for ๐Ÿ“š What Are Data Types?

What Are Data Types?

A Fun Guide For Curious Coders Aged 8โ€‘10


When you play a video game, write a story, or count your stickers, youโ€™re using Dataโ€”bits of information that a computer can understand. But just like you sort your crayons by colour, computers sort data into different Data Types. Knowing the right type helps the computer do the right job. Letโ€™s explore!


1. Numbers: Integers and Floats

TypeWhat it looks likeExample
Integer (whole number)No decimal point7, โ€‘3, 0
Float (decimal number)Has a dot (.)3.14, โ€‘0.5

Why it matters:
If you tell the computer to add two Integers, it gives an integer result. If you mix a Float with an integer, the answer becomes a float.

Cause & Effect:

  • Cause: Adding 5 (integer) + 2.5 (float)
  • Effect: The computer returns 7.5 (a float) because a decimal appeared.

2. Text: Strings

A String is any collection of letters, numbers, or symbols inside quotes: "Hello", "2025", "โญ๏ธ".

Fun fact:
Even though "123" looks like a number, the computer treats it as text.

Cause & Effect:

  • Cause: Trying to multiply "3" ร— 2
  • Effect: The computer gets confused (an error) because you canโ€™t multiply words the way you multiply numbers.

3. True or False: Booleans

A Boolean can only be one of two values: True or False. Itโ€™s like a light switchโ€”either On or Off.

Example:
isRaining = True means it Is raining.

Cause & Effect:

  • Cause: If isRaining is True, the game might show a rainy background.
  • Effect: The scene changes automatically because the boolean told the program what to do.

4. Collections: Lists

A List stores several items in a specific order, separated by commas and wrapped in brackets: ["apple", "banana", "cherry"].

Did you know?
Lists can hold many different data types together, like [5, "hi", True].

Cause & Effect:

  • Cause: You ask the computer for the 2nd item in the list.
  • Effect: It returns "banana" because the computer counts positions starting at 0.

Data Types Quiz

๐ŸŽฏ Ready to test your knowledge?

3 questions โ€ข Get instant feedback

Conclusion

Youโ€™ve learned the basic data types and how they help computers understand information!

Continue the adventure

Download Surprise Button for iPad

A simple, safe way for kids to explore the internet. With one tap, they discover something new โ€” a fun fact, a science experiment, a story, or a place in the world they never would've searched for.

Download on the App Store

Your child explores safely on Surprise Button App

๐ŸŒ‹

How Volcanoes Form

From Magma to Mountain

Volcanoes grow where tectonic plates collide or drift apart. Heat melts rock into light, buoyant magma that rises, cools, and hardens near the surface, building the cone layer by layer.

Know exactly what to talk about tonight

Maya's Daily Discoveries - March 15 Inbox

๐Ÿš€ Today's Learning Journey

๐ŸŒ‹
How Volcanoes Form
18 min โ€ข Longest session today
๐ŸŽจ
Ancient Egyptian Art
15 min โ€ข Visited twice today

๐Ÿ’ฌ Tonight's Conversation Starters

"Can you explain how volcanoes form?"