English National Curriculum:
Key Stage 2
Tooltip content
TO create (and debug) simple programs.
learning objectives
Tooltip content
to acquire a basic understanding of making choices (conditionals).
success criteria
- I understand what a choice is.
- I can describe how ‘If/Then/Else‘ works.
- I understand the two outcomes of a choice.
top tips
- There are always two outcomes after a True or False choice.
- When it’s True, we take the ‘True‘ branch. When it’s ‘False‘, we take the ‘False‘ branch.
Common misconceptions
- We can take both True and False branches.
- It is not possible to take both branches, we can only take one branch.
- A condition and a selection are the same.
- A condition asks a question and selection processes the answer by taking one of the two branches.
list of activities
- Activity 1 - Robot Commands
- Activity 2 - Gummy Bear Codes
- Activity 3 - 'Then' versus 'Slse'
- Activity 4 - Conditional Flowcharts
- Activity 5 - Single Branch Conditional Flowcharts
- Activity 6 - Flowcharts - 2 Branches
- Activity 7 - Double Flowcharts
- Activity 8 - Lucky Number Games
- Activity 9 - Design Your Flowcharts
Conditionals
Boolean expressions
Selections
Nested
It is common to include conditional statements to decide if we should do one thing or another, depending on whether a specific condition is True of False. It is helpful to think of those as choices.
Conditionals depend on a condition (whose answer is either True or False). These conditions are Boolean Expressions.
A selection processes what happens next after a conditional. We can think of these as the choices we’ve made.
A nested conditional is a conditional that is nested (meaning, inside) another conditional or if/else statement. Those statements test true/ false conditions and then take an appropriate action.
TOPIC BACKGROUND READING
Conditional statements, expressions, or simply conditionals are Features of programming languages that tell the computer to execute certain actions, provided certain conditions are met.
Conditional statements are used through the carious programming languages to instruct the computer on the decision to make when given some conditions. These decisions are made only when the conditions are met, true or false, depending on the functions the programmer has in mind.
Conditionals can be represented within our flowchart plans. A yellow conditional diamond splits a conditional or questions into the paths of available responses.
Conditionals can also be called ‘if statements’,one of the building blocks of computer programs. This represents performing one action IF something is true and another action IF it is false.
For example:
IF you like pizza:
Eat Pizza
ELSE
Eat something else
The above example show a written form of a decision, IF you like pizza the result is to ‘Eat Pizza’, if you don’t like pizza you should ‘Eat something else’.
IF for one path ELSE for the other.