Represent algorithmic processes without using a programming language.
Implement and apply an algorithm.
Determine the result of code segments.
Learning Objective: Express an algorithm that uses selection without using a programming language.
Selection determines which parts of an
algorithm are executed based on a condition
being true or false.
Learning Objective: For selection:
a. Write Conditional statements
b. Determine the result of conditional statements.
Conditional statements, or “if-statements,”
affect the sequential flow of control by
executing different statements based on the
value of a Boolean expression.
AAP-2.H.2
The exam reference sheet provides
Text:
IF(condition)
{
<block of statements>
}
in which the code in block of
statements is executed if the Boolean
expression condition evaluates to
true; no action is taken if condition
evaluates to false.
AAP-2.H.3
The exam reference sheet provides
Text:
IF(condition)
{
<first block of statements>
}
ELSE
{
<second block of statements>
in which the code in first block of statements is executed if the Boolean expression condition evaluates to true; otherwise, the code in second block of statements is executed.