Repository navigation
variables
Okay, Let's start with the basics. imagine you have a box where you can store different things, like a name, a number, or even your favorite color.
A variable is like that box in the programming world.
Let’s look at an example. If you have a variable called age, you can store the number 20 in it. Later, when your age changes, you can update it to 21. Here, what we’re doing is telling the computer, "Please remember my age so I can use it whenever I need it."
Creating a variable is like giving a name to your storage box and putting something inside it. Here is an example of how to create a variable with Tactigon Shape.
createVariable.mp4
After you create the variable, you can easily assign a value by dragging one of our blocks with a value (like a number, word, or color).
Now let the computer remember it for later use.
Example: Let’s say you want to store a number in a variable, You can follow this video and try on your own.
SetVariablesAs.mp4
If you do not assign a value to a variable, it will give you an error because the variable has not been assigned a value
Perfect! Now, I have a variable with a value assigned to it—in this case, 2. Hmm… now I want to increment that value by 1, so I can tell the computer, 'Hey, please add 1 to this variable.'
You can follow this tutorial and try it with your shape.