Implement and apply an algorithm.
Determine the result of code segments
Learning Objective: For relationships between two variables, expressions, or values:
a. write expressions using relational operators
b. evaluate expressions that us relational operators
AAP-2.E.1
A Boolean value is either true or false.
AAP-2.E.2
The exam reference sheet provides the
following relational operators: =, ≠, >, <, ≥,
and ≤.
Text and Block:
a = b
a ≠ b
a > b
a < b
a ≥ b
a ≤ b
These are used to test the relationship
between two variables, expressions, or values.
A comparison using a relational operator
evaluates to a Boolean value. For example,
a = b evaluates to true if a and b
are equal; otherwise, it evaluates to false
Learning Objective: For relationships between
Boolean values:
a. Write expressions using logical operators
b. Evaluate expressions that
use logic operators. 4.B
AAP-2.F.1
The exam reference sheet provides the logical
operators NOT, AND, and OR, which
evaluate to a Boolean value.
AAP-2.F.2
The exam reference sheet provides
Text:
NOT condition
which evaluates to true if condition is
false; otherwise it evaluates to false.
AAP-2.F.3
The exam reference sheet provides
Text:
condition1 AND condition2
which evaluates to true if both
condition1 and condition2 are
true; otherwise it evaluates to false.
AAP-2.F.4
The exam reference sheet provides
Text:
condition1 OR condition2
which evaluates to true if condition1
is true or if condition2 is true or
if both condition1 and condition2
are true; otherwise it evaluates to false.
AAP-2.F.5
The operand for a logical operator is either a
Boolean expression or a single Boolean value.