- Syntax: the rules of how words are used within a given language
- Selection: the principle of choosing what action to take based on certain criteria
- Nesting: placing one set of instructions within another set of instructions
- Iteration: the principle of repeating process
- Definite iteration: a process that repeats a set number of times
- Indefinite iteration: a process that repeats until a certain condition is met
- Loop: a repeated process
- Sequence: the principle of putting the correct instructions in the right order within a program
Selection
- The selection process allows a computer to compare values and then decide what course of action to take
Selection - Nested selection
- This can be written as a case statement
Repetition (Iteration)
- An iterative process has two parts - a pair of commands that show the start and finish of the process to be repeated and some sort of condition
- Definite iteration means that the instructions are repeated in a loop a certain number of times
- Indefinite iteration means that the instructions are repeated in a loop until some other event stops it
No comments:
Post a Comment