You can think of your computer as having a worksheet, CPU, program, and memory.


A variables is a piece of memory with a name. Programs move data into variables, mess with the variables, and show variables to the user. When programmers write code, much of the time they’re figuring out how to get data into variables, and what to do with the data once it’s there.

Programs can use different variables and do different computations, but still have the same structure. This structure is common:

  • Declare variables
  • Get data from the worksheet
  • Compute results
  • Put results into worksheet