Relational operators are symbols that allow you to compare two values.
Operator | Example | |
---|---|---|
== | Equal to | 6 == 6 |
!= | Not equal to | 4 != 3 |
> | Greater than | 5 > 2 |
< | Less than | 1 < 2 |
>= | Greater than or equal to | 1 >= 1 2 >= 1 |
<= | Less than or equal to | 1 <= 1 1 <= 2 |
Depending on the age and knowledge of the player, they may use more or fewer relational operators.
A child aged 4 years old is capable of using the '==' ("equal to") and '!=' ("not equal to") operators, but may find it more difficult to use the '>' ("greater than") and '<' ("less than") operators, and much more so the '>=' ("greater than or equal to") and '<=' ("less than or equal to") operators. For younger players, it may be more suitable to use "bigger than" and "smaller than" instead of "greater than" and "less than". If the player is young, it's not advisable to work with different operators in the same activity until they are familiar with them. Introduce the operators progressively.
Use the random function call ('roll die') within an assignment block and assign the die value to a variable. Then use relational operators to compare the value:
"Calling the random function" (roll die)
"Assigning the value '3' to variable 'a' "
Place the relational operator '==' ("equal to") to the right of the variable. Then, the player should place representations of the number equal to the value of the variable 'a' to the right of the operator:
Depending on the player's knowledge, introduce more or fewer operators:
Examples:
Place the relational operator '==' ("equal to") to the right of the variable. The player must place the numerical representation that is "equal to" the value 4 to the right of the '==' operator.
Place the relational operator '!=' ("not equal to") to the right of the variable. The player must place a numerical representation that is "different from" the value 4 to the right of the '!=' operator.
Place the relational operator '>' ("greater than") to the right of the variable. The player must place a numerical representation that is less than the value 4 to the right of the '>' operator.
etc.