6.2.2: be able to write programs that make appropriate use of sequencing, selection, repetition (count-controlled, condition-controlled), iteration (over every item in a data structure) and single entry/exit points from code blocks and subprograms
| Keyword | Definition |
|---|---|
| code block | section of code which is all indented by the same amount |
| entry point | the first line of code which is executed |
| exit point | the last line of code in a code block or subprogram to be executed |
| function | named section of code which can be called multiple times and always returns a value |
| iteration | using FOR to loop through each value in a data structure (e.g. list or string) |
| procedure | named section of code which can be called multiple times and never returns a value |
| repetition | using FOR or WHILE to allow code to repeat a set number of times or whilst a condition is met |
| selection | using IF to allow code to make a choice |
| sequence | multiple lines of code that have to be executed in order |
| subprogram | a procedure or function |