Problem-solving in the programming requires three basic constructs. There are classified as follows:
In programming languages they are used to design, control the (flow) create branches, and repeat the execution of steps.
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.
A selection construct tells for selection between logical outcome (True or False). The two types of selection construct are:
If elif else statements
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