Mapa mental
Algorithm constructs
Contenido del mapa
Algorithm constructs
Sequence
- A number of instructions that are processed one after the other.
- Order of steps in code
- DECLARE count SET count TO 1 OUTPUT the value of count
Assignment
- Used to store the value of an expression into a variable.
- Assignment is the way that a variable is told to remember a certain value.
- Declaring a Variable
- DECLARE studentName SET studentName TO Bob
Selection and Condition
- A selection statement uses a condition to select, or determine, the next line of the program that is to be executed.
- If, if else
- CALCULATE totalCost IF (totalCost > $10) THEN OUTPUT 'no delivery charge' ELSE OUTPUT '$5 delivery charge' ENDIF OUTPUT 'thankyou
Iteration
- Iteration is also called repetition and is used when something is repeated over and over again, so anything where the program goes round in a loop.
- For loop
- DECLARE count SET count TO 0 FOR count = 1 to 10 OUTPUT count END FOR OUTPUT ‘finished’
- While loop
- DECLARE count SET count TO 0 WHILE (there are items in a pile) ADD 1 TO count END WHILE OUTPUT the number of items
Modularisation
- Modularisation is used to reduce the complexity of a system by deconstructing it into independent units or modules.
- FUNCTION delivery_charge CALCULATE totalCost IF (totalCost > $10) THEN OUTPUT ‘no delivery charge’ ELSE OUTPUT ‘$5 delivery charge’ ENDIF OUTPUT ‘thankyou’ END FUNCTION
Información
- Descripción
- Mapa Mental sobre Algorithm constructs, creado por Heidi Mak el 20/04/2026.
- Creado por
- Heidi Mak
- Visitas
- 0
- Valoración