Hi, welcome to TecTerminal.
Welcome.
So, what are variables?
Well, let’s go back to our cake analogy. Let’s say you’ve gotten a recipe book, you’ve looked at the instructions, and you’re ready to bake your cake.
I would assume — and I really hope I’m right — that you won’t just get all the materials and dump them on the table, right? You would probably do something like this:
Well, that’s kind of what variables are.
Variables are simply named containers that a computer uses to store information that you give it.
The name of the variable is set by the programmer, and then the computer takes this information and stores it somewhere in its memory.
For example:
name, email, and age.age variable (which was 18) and add 1 to it, making it 19.These are some of the uses of variables. And believe me — in every program you write, without exception, you will be using variables a lot.
In our next lesson, we’re going to talk about data types — what they mean and how they are used in programming. See you there!
Not a member yet? Register now
Are you a member? Login now