Control structures
Algorithms are built on three main control structures
- Sequence
- Selection
- Iteration
Main control structures
Sequence
Sequence is where one action is done after another action.
Selection
Selection is where certain actions are ran only if a condition is met.
Iteration
Iteration is where certain actions are completed one after another.
Loops
Loops allow the program to loop over actions in the program either infinitely or with a set amount of loops.
Branches
Branches are where the code makes a decision based off an condition and decides whether or not to run a section of code.