Program Constructs

Problem-solving in the programming requires three basic constructs. There are classified as follows:

Sequence

Selection

Repetition

In programming languages they are used to design, control the (flow)  create branches, and repeat the execution of steps.

1. Sequence

A sequence construct tells which step is to be executed next. Some programming languages use a goto statement. This is used in computer programming, however, goto statement is discouraged even if provided by the language.

2.Selection

A selection construct tells for selection between logical outcome (True or False). The two types of selection construct are:

If statements

If elif else statements

Selection

IF
The IF block is executed when the condition is true
IF ELSE
The IF block is executed when the condition is true, otherwise ELSE block is executed.
IF ELIF ELSE Ladder
The IF ELIF ladder is used for multiple conditions, there can be multiple ELIF blocks. if none of the condition is matched ELSE block is executed.

3. Repition (Loops)

A repetition or loop construct tells a group of steps to be invoked repeatedly until some end condition is met. There are three main forms of repetition:

​​​​​​​Fixed count loops - repeat block a pre-defined number of times.

Variable count loops - Use break and continue based on  some condition

Loop - Iterate  an Iterator

​​​​​​​​​​​​​​Loops

FIXED COUNT LOOPS
Fixed count loops are repeats set of steps a fixed number of times as specified on entry into the loop. 
VARIABLE COUNT LOOPS
The fixed count loop repeats the steps as per pre-define conditions. The loops can be terminated or iteration is skipped based on some condition.
LOOP ITERATE AN ITERATOR
This type of loop use to iterate and iterator user does need to track the counter, once the iterator is exhausted loop is terminated.