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?"