Chapter 6: Working with Data – Variables
In previous chapters, we stated that a program is something that takes data as input and performs operations on it to produce new data. So, handling data is crucial in any application, regardless of whether it is used for accounting or whether it is a game.
When we work with data, it must be stored in the computer's memory, and this is done with variables. It is variables that let us store and retrieve data. In this chapter, we will get to know variables, see how they work, and, in the end, look at some operations that we can perform on them.
In this chapter, you will learn about the following:
- Declaring and initializing variables
- Understanding data types and applying them to variables
- Using composite types to handle multiple values
- Performing operations on variables using operators
- Operating on numbers and manipulating strings
- When programming, we need to work with data, and that data will be stored...