Programming definition of variable

A computer has a memory programming definition of variable can remember stuff. To get a computer to remember stuff, you use variables.

Did not find what they wanted? Try here

A variable is a piece of information with a name for that information. Let’s say you’re shopping for groceries, and you need to buy five apples. You can tell the computer to remember how many apples you need to buy. You can use a variable for this. When you run the program, the computer will now store the number 5 in its memory. It will give that piece of information the name “apples. To get the information back from the computer, you simply tell the computer the name of the information that you’re looking for.

The computer will look in its memory to find that information and give it back to you. When you run the program, the computer will notice that apples is a variable. It will look in its memory and show you that it remembered that you put 5 there earlier in the program. Variables can be given any name that doesn’t have any weird symbols in it. The variable name can have numbers in it as long as the name doesn’t start with a number.