Starter Town Logo

Starter Town Ep. 3: Bento Bytes

May 31st, 2025

You’re packing your lunchbox for another adventure. But this time, a vendor nearby catches your ear. “Careful” they say, “You gotta sort by type!”

Don’t mix your soup with your sushi
“Don’t mix your soup with your sushi”

You look down at your bento tray. Each section neatly labeled. A balanced bento. Let’s learn why that matters.

What kind of snacks do we have?

You already know variables are like labeled snack boxes.
But here’s the twist: each snack also has a flavor (type). A category that tells the computer how it should be used.

We’ve been storing snacks but now we're also sorting them.

Let’s look at the most common data types and how they fit into your bento.

Type    : What it is             - Example
-----------------------------------------------
String  : Words & text           - "Sushi"
Char    : A single character     - 'A'
Integer : Whole numbers          - 5
Float   : Decimals & Precision   - 3.14
Boolean : True/False             - False

These are all primitive types and the ingredients that build your program.

Empty snack boxes…

Sometimes, you create a variable but don’t put anything in it yet. That’s okay, as long as you’re clear about it.

We use special keywords to say, “This box is intentionally empty for now.” snack = none

Think of it as a snack tray with a label, but nothing inside yet. It’s not broken, it’s just waiting to be filled.

Some beginners use None (or null, or undefined in other languages) as a “just put anything here” button. Don’t fall into that trap! It’s also not the same as False or 0. It’s no value at all.

Use it only when you truly mean, “This has no value yet, but it will.” Like a player’s name at the start of a new game before it’s been entered.

A balanced bento

Here’s what a healthy set of variables could look like:

snack = "onigiri"         # string
snack_count = 2           # integer
snack_price = 4.50        # float
is_delicious = True       # boolean
first_letter = 'O'        # char
snack_note = None         # empty for now

Each one is clearly labeled and stored in the right compartment. Now the computer knows how to treat each value too.

And sometimes a snack is sealed. You pack it once, and no one’s allowed to change it. These are called constants. They’re like labels that say: “Hands off! This is set for the journey.”

# This snack is sealed for the trip.
const string favorite_dessert = "mochi"

favorite_dessert = "pudding"
# ERROR! You can't change a constant once it's packed

You won’t always need them yet, but it’s good to know they exist.

Oops… Not again

Every bento has its perfect layout. But if you mix them up? Looks like our miso soaked the mochi again

Imagine trying to stack miso soup and mochi, one’s sloshy and one’s soft. Computers need to know what each item is, so they know how to handle it.

string snack = "miso"
int number_of_mochi = 3

snack += number_of_mochi # ERROR! You can't add a number to a string.

If you try to combine mismatched types, like adding a number to a string, the computer gets confused and we’re left with a messy lunch.

Oh? A gift in our bento

Let’s take a peek at the yummy types we’ve seen so far

Bento sensei breakdown of types
So useful! Seems like values can hint at its type too — Arigatou Gozaimasu Bento sensei!

Some languages care a lot about type labels, but that’s a conversation for another day.


Quest Log Updated.

  • Data comes in different types
  • Mixing types can cause errors (and messy lunches!)
  • Constants can’t be changed after they’re assigned
  • You can use None for empty-but-labeled variables. Just don’t overdo it

Episodes

© 2025 Blackcat School of Interactive Arts. All rights reserved.