3.2 if Statements and Control Flow
Enduring Understanding
Programmers incorporate iteration and selection into code as a way of providing instructions for the computer to process each of the many possible input values.
Learning Objective
Represent branching logical processes by using conditional statements.
Essential Knowledge
Conditional statements interrupt the sequential execution of statements.
if statements affect the flow of control by executing different statements based on the value of a Boolean expression.
A one-way selection (if statement) is written when there is a set of statements to execute under a certain condition. In this case, the body is executed only when the Boolean condition
is true.
Last updated
Was this helpful?