Operators
Explore the role of operators in programming, including arithmetic, relational, and logical types. Understand how to use them to perform calculations and comparisons, which are essential skills for writing effective code.
We'll cover the following...
We'll cover the following...
Operators
Previously, we discussed how a statement is made up of expressions and that expressions can be made up of operations or operands.
Let’s see an example of this. Here, we’ll create two variables and assign a value to each of them. Then, we’ll add the two values together and store the result in a new variable:
On line 1, we create a variable called number1 and assigned the value 10 to it. We now know that this means several things: ...