CHAPTER4

Variables

In This Chapter

  • Defining variables
  • The concept of variable types
  • How to create a variable
  • The value of variables

Back in Chapter 3, I very briefly introduced the concept of a variable with input_var. In this chapter, I take you deeper into variables, including what they are, how to create them, and how to find their values and types.

Variables Defined

Put most simply, a variable is a little computer storage bin in your program that has a name. You can think of a variable as a folder in the filing cabinet that is your program. Each variable has its own folder, and the content of that folder is the value of the variable.

Get Beginning Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.