Mapa mental
Chapter 2 - Selection
Conteúdo do mapa
Chapter 2 - Selection
Program Constructs
- Sequence
- 2 or more statements one after another.
- Assignment statements
- When a value is assigned to a variable.
- Sequence
Selection statements
- Used to select which statement will be executed next, depending on a condition
- Decided by Rational Operators.
- E.g. IF (expression1) THEN Do these statements ENDIF
- Decided by Rational Operators.
- Rational Operators
- > | Greater than
- < | Less than
- >= | Greater than or equal
- = (or == in python) Equal to
- <= | Less than or equal
- <> (or != in python) | Not equal to
- Used to select which statement will be executed next, depending on a condition
CASE Statements
- E.g. CASE choice of 1:OUTPUT "You have selected option 1" (more statements here) 2:OUTPUT "You have selected option 2" (more statements here) 3:OUTPUT "You have selected option 3" (more statements here) ELSE OUTPUT "You must enter 1,2 or 3" ENDCASE
- Used instead of a nested If statement
- Useful when there is a choice between several alternatives
Boolean Operators
- AND Operator
- Used when both statements are true
- XOR Operator
- NOT Operator
- OR Operator
- AND Operator
Informações
- Descrição
- A level Computing (3.2) Mapa Mental sobre Chapter 2 - Selection, criado por Daniel Mapplebeck em 09-03-2017.
- Criado por
- Daniel Mapplebeck
- Visualizações
- 1
- Avaliação