Chapter 5: Exploring Operators and Expressions
So far, we have seen how values are stored to and from variables. Simply storing and retrieving values to and from variables, while important, is only a small part of handling values. What is far more important is the ability to manipulate values in useful ways, which corresponds to the ways we manipulate real-world values, such as adding up our restaurant bill or calculating how much further we have to go to get to grandma's house and how much longer that might take.
The kinds of manipulations that are reasonable to perform on one or more values depend entirely on what kinds of values they are, that is, their data types. What makes sense for one data type may not make sense for another. In this chapter, we will explore the myriad ways that values can be manipulated.
The following topics will be covered in this chapter:
- Understanding expressions and operations
- Exploring operations on numbers and understanding the...