A variable is a location in computer memory where you can store and retrieve a value. Your computer’s memory can be thought of as a series of cubbyholes lined up in a long row. Each cubbyhole is numbered sequentially. The number of each cubbyhole is its memory address.
Variables have addresses and are given names that describe their purpose. In a game program, you could create a variable named
score to hold the player’s score and a variable named
zombies for ...