Comparison operators let us compare two values. Using comparison operators in programming is similar to math in that less than <
, greater than >
, less than or equal to <=
, and greater than or equal to >=
are the same. The differences are that operators for equal to are ==
and not equal are !=
. Using comparison operators allows our program to make decisions.
Students will be able to…
* Explain the meaning of each of the comparison operators (<, <=, >, >=, ==, !=)
* Create programs using the comparison operators to compare values
* Predict the boolean result of comparing two values
* Print out the boolean result of comparing values
These are all the activities included in the lesson