Use Sophia to knock out your gen-ed requirements quickly and affordably. Learn more
×

Learning about Arrays and Variables

Author: Wes Warner

Simple array

Here is a photograph of an array of lego minifigs.  In computer programming, most languages would say that the array depicted would be [15]  as the first minifig would take up position 0 and the 2nd would have position 1 and so forth.

 

What is a variable?

Variables exist everywhere in our life.  It does not need to be unknown.  Take for example these scripts from the computer program Scratch.  The variables identified are events.  For example a variable for you might be when you get breakfast.  The variable could be when at what time do you feel hungry, or what you have for breakfast.