We're going to have some rules about boxes. First, it can only hold one value. For now, a value is a whole number. It can be positive, negative or zero.
Second, we can only do two operations with boxes. We can either read from a box, or write to a box.
Just to make sure you're keeping up, answer the following easy question. What two operations can we perform on a box?
Why do we read from a box? Can't we just "look" at a box to determine what value is in it? First of all, computers don't have eyes. They can't "see" anything. They can, however, request the value from a box. Secondly, even humans have a similar problem. You might be asked "What is the first word of page 316 of the Hitchhiker's Guide to the Galaxy". You have to go look up page 316 to find it. Similarly, computers have to look up values too.
What if the box had the value 10, and you write 10 to the box? It keeps the same value. There is no error.
This is a very easy exercise. The easiest way for you to do this is to have a piece of paper, draw a box, put a value of 0 inside the box. Each time you do a write operation, cross out the old value, and put in the new value. It's OK if you draw outside the box when doing this.
Each time you do a read operation, you tell me what's in the box.
Let's begin: