Table of Contents
Branching or conditional statements
Branching is a feature provided by programming languages that makes it possible to execute a sequence of statements among several possibilities.
The if statement has to be followed by a condition. Then a block is opened by a colon. This block contains the sequence of statements that has to be executed if the condition is fulfilled. Figure 7.3 and Figure 7.2 highlight the structural parts of the if statement.