Giving and Receiving Data
Programs come in many different sizes and have many different purposes. Here are three things all programs have in common:
- A way to receive information from the user
- A way to give information back to the user
- A way to store and work with information in between giving and receiving
Information, or data, that a program receives from a user is called input. What the program gives back to the user is called output. In the time between when a program receives input and produces output, it needs some way to store and work with the various types of data that has been inputted, so it can produce output.
In the real world, when you want to store something, give something away (as a gift, for example), move something, or organize something, you often put it in a box.
Variables make it possible for the same program ...