Variable

A variable is a piece of data that you can alter that has also been given a name.

Many software applications such as spreadsheets and databases make use of variables. All computer programming languages can handle variables.

For example

myname = "Henry"

The variable is 'myname' and its value is 'Henry'. Variables can hold any type of data. For instance a variable can represent a number

cost = 15

Variables are used instead of the value itself because it makes it easier for someone to understand what you are trying to do. For instance a formula such as this:-

total_cost = cost + tax

Makes more sense than

total_cost = 15 + 3

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: Variable

 


2020-10

back to glossaryback to glossary