Page 91 - Computer_Genius_v2.1_C7_flipbook
P. 91
Since coding involves logical instructions and pinpoint accuracy, it can be an excellent tool for
solving math problems. In fact, there are a few blocks in AI Connect that directly use mathematical
reasoning to find answers to their problems.
Logical Operators
Logical operators in programming are commands that take decisions for a code based on specific
conditions defined by the user. They can be very helpful for building complex programs that can take
decisions on their own. They follow a strict rule of logic that guides the program and instruct it what
to do and when to do.
Name Symbol Description
AND When both conditions are
true.
OR When one of two conditions
is true.
NOT It reverses the logic of the
code when the conditions
are ‘NOT’ true.
Relational Operators
Relational operators are blocks of commands that direct the code based on the relation between two
variables or values. If the specified relation between variables stands true, the code acts accordingly
and performs the specified task given by the user. Here’s a list of relational operators that we can
use in AI Connect:
Name Symbol Description
EQUAL Condition is true when both
values are equal.
NOT EQUAL Condition is true if both the
values are NOT equal.
STRICTLY LESS The condition is true if the left
value is less than the right value.
LESS THAN OR The condition is true if the left
EQUAL TO value is less than or equal to the
right value.
STRICTLY The condition is true if the left
GREATER THAN value is greater than the right
value.
GREATER THAN The condition is true if the left
OR EQUAL TO value is greater than or equal to
the right value.
Exploring Math with Coding 89

