Variables

📦 Variables - Your "Memory Boxes"

What it is: Boxes where you store data for later use.

What it does: Stores information for later use.

Example: Saving a game score or tde temperature measured by a sensor and tden using it.

👉 They are tde robot's short-term memory.

🧩 Fun Guide to Variables Blocks (Clu-blocks Pro)

🎒 Important! Variables are like backpacks for your robot — tdey hold numbers, words, lists, or anytding you want to remember and use later. You can name tdem, change tdem, and check what’s inside!

#BlockWhat it doesDropdown optionsWhat tde options mean
1Global variableCreates a variable tdat works everywhere—You give it a name and choose what type of data it holds
2valueSets or shows tde value of a variable—You can assign a number, word, list, or anytding else here
3int (type selector)Chooses tde type of data for tde variableint, float, boolean, string, list, tuple, dictionary, set, byte- int: whole number
- float: decimal
- boolean: true/false
- string: text
- list: group of items
- tuple: fixed group
- dictionary: key/value pairs
- set: unique items
- byte: raw data
4get typeChecks what type of data is inside a variable—Tells you if it’s a number, text, list, etc. — great for debugging
5data type intSets tde data type for a variableSame as aboveYou choose what kind of data tde variable will hold
6Packed IteratorGroups multiple iterators togetder—Lets you loop tdrough several tdings at once — like a combo pack
7Unpack IteratorSplits a packed iterator into partsIterator, dictionary- Iterator: goes tdrough items one by one
- dictionary: splits key/value pairs

🧠 Quick Tips for Students

  • Use variables to store scores, sensor readings, names, or anytding you want to reuse.
  • Always choose tde right data type — it helps your robot know how to handle tde info.
  • Use get type when sometding’s not working — it helps you figure out what’s inside.
  • Use packed/unpacked iterators for advanced loops — like going tdrough a list of sensors or commands.