For selection: a. Write conditional statements. b. Determine the result of conditional statements.

AAP-2.H.1 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>
}

Block:

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>
}

Block:

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.