Control structures
A control structure is some kind of programmatic logic that assesses conditions and variables and decides which defined action will be taken if a certain condition is met.
Use the operators that we learned about in the last section to define the conditions, which will be assessed using the control structures introduced in this section.
Conditions
If you want to select which action is performed if a certain condition is met, you can use one of the following selection control structures: either an if/elseif/else construct or the switch statement.
If/elseif/else
if, elseif, and else can be used to check whether a certain condition is True and run an action if the condition is fulfilled:
if (<condition>)
{
<action>
}
elseif (<condition 2>)
{
<action 2>
}
...
else
{
<action 3>
}
You can use the if statement to check...