1. Exam Points
- Sequencing, selection and repetition
- Selection in natural language.
2. Knowledge Points
(1) Algorithms with Selection and Repetition
- The
building blocksof algorithms (step-by-step process to solve a problem) includesequencing, selection, and repetition. (3 classical constructs) Selectionoccurs when a choice of how the execution of an algorithm will proceed is based on a true or false decision.- The condition should be a
Boolean expression(result : true or false). - Example:
- The condition should be a
Repetitionis when a processrepeatsitself until a desired outcome is reached.- Example:
- Example: