Before we discuss which team solved the previous equation correctly, let look at the mathematical operators, also known as arithmetic operators, we will use in computer science.
One of the most basic thing a computer program can do is simple math.
On scratch paper, write down your expected result for each of the operators above.
The embedded code below is written in Java, a language that is similar to Processing.
In Java, the code we use to display text to the console is System.out.println followed by what we want displayed inside parentheses.
For this code, we are displaying the sum of 5 + 3, which is 8.
Run the program below by clicking the Run button and you should see the value 8 displayed on the console.
Now, inside the code window, change the '+' to a '-' and rerun the program.
This time, the program should display the value of 5 - 3, which is 2.
Continue to change the mathematical operator in the print statement to check your earlier calculations.