Selection and flowcharts: 11+ computing lesson and practice questions
A 5-minute video lesson, the method for following any flowchart or block script, the mistakes children make most, and 10 practice questions with worked answers.
Wider curriculumComputingYears 5 and 6Free, no sign-up
To follow a flowchart, start at Start and do what each box says, one box at a time. At each diamond,
answer its question with Yes or No and follow that arrow, until you reach End. Block scripts work the same
way: run the blocks from the top, one at a time.
For example, if a diamond asks "Is the temperature more than 25?" and the temperature is 25, the answer is
No, because 25 is not more than itself, so you follow the No arrow.
Video lesson: selection and flowcharts
5 minutes 25 seconds. Captions are shown in the video, and the full transcript is below.Read the video transcript
Hi there! Today we're learning to follow flowcharts and block scripts. In a flowchart, rounded boxes start and end, rectangles say do this, and diamonds ask a question, with Yes and No arrows.
The charge is 80: what does the battery checker output? Is 80 more than 80? No, more than 80 leaves out 80 itself. Is 80 more than 38? Yes: Fine for now, then that box's own arrow to End, not the box underneath. So the answer is option B, Fine for now. Option A counts 80 as more than 80, option C reads on down the page, and option D takes a wrong arrow.
Which number makes this flowchart output "Lamp on"? It needs Yes at every diamond: 64 is even, and more than 58. So the answer is option C, 64. Option A: 58 is not more than 58; option B, 61, is odd; and option D, 50, is less than 58.
The number 47 is put into this machine: what numbers does it output, in order? Keep a table: output, add 5, check; 52, 57 and 62 are less than 67, so round it goes. Output 62, add 5: 67 is not less than 67, so it stops. So the answer is option A: 47, 52, 57, 62. Option B stops a pass early, option C outputs 67 too, and option D stops after the first output.
Now the output is after the loop; 11 goes in: what number does it output? Double: 22, then 44, not more than 75, so round again; then 88, which is more than 75. So the answer is 88.
Now a block script: what number does the sprite say? Set puts 15 in shells; each change adds 9 to what's already there, 4 times: 24, 33, 42, 51. So the sprite says 51. The traps: 24 repeats once, 36 forgets the start, and 60 does an extra pass.
An if block runs only when its question is true: what number does the sprite say? Each pass, n goes up by 1: 6, then 7, are not more than 7, so no fish are added. Then n is 8, 9 and 10, so it's 11 + 8 + 9 + 10. So the sprite says 38.
Your turn: which number makes this flowchart output "Robot dances"? Pause and test each option at both diamonds. 63 is 9 times 7, a multiple of 7, and it's less than 70. So the answer is option D, 63. Options A and C are not less than 70, and option B, 66, is not a multiple of 7.
Let's review: follow each box's own arrow. More than and less than leave out the number itself. Track loops pass by pass. Well done! Now try some questions to show what you know.
The method in five steps
Know the shapes. A rounded box is Start or End. A rectangle is a step to carry out, such as a sum. In these questions inputs and outputs are in rectangles too, though many flowcharts put them in a parallelogram (a slanted box). A diamond is a decision with a Yes arrow and a No arrow.
Answer each decision exactly. "More than" and "less than" leave out the number itself. Check "even" and "multiple of" carefully too.
Follow each box's own arrow. After an output box, the arrow often goes straight to End. Do not read on to the box underneath unless the arrow takes you there.
Track loops pass by pass. If an arrow goes back up, write down the value after every pass and check the diamond each time. If the output box is inside the loop, you get a list of outputs; if it is after the loop, you get one number.
To find an input, test every option. Put each option through the whole flowchart. The right one must reach the output asked for, which usually means passing every diamond on the way.
Block scripts use the same idea. A set block gives a starting value. A
change by block adds to whatever is there already. A repeat block runs the
blocks inside it that many times. An if block runs the blocks inside it only when its
question is true on that pass, so in a repeat it may run on some passes and not on others.
Worked examples
Example 1: a flowchart with two decisions
A rain gauge flowchart takes the day's rainfall in millimetres. The first diamond asks "Is the rainfall more than 35 mm?": Yes goes to "Output: Heavy rain". No goes to a second diamond, "Is the rainfall more than 4 mm?": Yes goes to "Output: Light rain" and No goes to "Output: Dry". Every output box has its own arrow to End. What is the output for 35 mm?
First diamond: is 35 more than 35? No, 35 is equal to 35, not more. Follow the No arrow.
Second diamond: is 35 more than 4? Yes. Follow the Yes arrow to "Output: Light rain".
That box's own arrow goes to End, so nothing else is output. The answer is Light rain.
To get "Dry", the rainfall needs No at both diamonds: 4 mm or less, for example 3 mm.
Example 2: a loop with the output after it
A flowchart says: Start, input a number n, multiply n by 3, then a diamond "Is n more than 100?". No goes back up to "multiply n by 3"; Yes goes on to "Output n", then End. The number 5 goes in. What is the output?
Pass 1: 5 × 3 = 15. Is 15 more than 100? No, so go round again.
Pass 2: 15 × 3 = 45. Is 45 more than 100? No, so go round again.
Pass 3: 45 × 3 = 135. Is 135 more than 100? Yes, so leave the loop.
The output box is after the loop, so only one number comes out: 135.
Example 3: an if block inside a repeat
A script says: set total to 3, set n to 2, then repeat 4 times: (if n is less than 4 then change total by 10), then change n by 1. Finally, say total. What does the sprite say?
Pass 1: n is 2. Is 2 less than 4? Yes, so total becomes 3 + 10 = 13. Then n becomes 3.
Pass 2: n is 3. Is 3 less than 4? Yes, so total becomes 13 + 10 = 23. Then n becomes 4.
Pass 3: n is 4. Is 4 less than 4? No, so total stays 23. Then n becomes 5.
Pass 4: n is 5. Is 5 less than 4? No, so total stays 23. Then n becomes 6.
The sprite says 23.
Common mistakes
Counting the number itself as "more than" or "less than". A number is never more than, or less than, itself, so an equal value always takes the No arrow.
Reading straight down the page. After an output box, follow its own arrow. Answers such as "this output and then that one" come from reading on to the next box.
Stopping a loop too early or too late. Check the diamond after every pass. Stopping a pass early, or doing one extra pass, gives a wrong number or a list that is too short or too long.
Forgetting the starting value. In a block script, "change by" adds to what is already there, so the starting value from the set block is part of the answer.
Running an if block on every pass. The blocks inside an if run only when its question is true for the value on that pass.
Checking only one decision. When a flowchart has two diamonds, an input can pass the first and still fail the second. Test every option at every diamond.
10 practice questions with answers
Tap an answer to check it, or open the worked answer. The questions start simple and finish at the level of a harder 11+ question.
1.Which number makes this flowchart output "Door opens"?
20
21
19
26
Show the answer
19. "Door opens" is on the Yes arrow, so n must be less than 20. 19 is less than 20. 20 is equal to 20, not less than it, so it takes the No arrow, and 21 and 26 are more than 20.
2.Chloe is 95 cm tall. What does the ride's sign output?
Ride with a grown-up and then Ride alone
Ride alone
Ride with a grown-up
Not today
Show the answer
Ride with a grown-up. Is 95 less than 95? No, it is equal, so follow the No arrow to the second diamond. Is 95 less than 115? Yes, so the output is "Ride with a grown-up". That box's own arrow goes to End, so "Ride alone" is never reached.
3.This script is from a block-coding app. What number does the sprite say?
16
7
9
13
Show the answer
13. Score starts at 4. Each pass adds 3: 4 + 3 = 7, 7 + 3 = 10, 10 + 3 = 13. After 3 passes the sprite says 13. (7 stops after one pass, and 9 forgets the starting 4.)
4.This script is from a block-coding app. What number does the sprite say?
68
54
23
77
Show the answer
68. The repeat adds 9 six times, which is 6 × 9 = 54 altogether. Add that to the starting 14: 14 + 54 = 68. (54 forgets the starting value, 23 adds 9 only once, and 77 does one pass too many.)
5.The number 6 is put into this machine. What number does it output?
34
41
13
27
Show the answer
34. 6 + 7 = 13, less than 30, so go round. 13 + 7 = 20, round again. 20 + 7 = 27, still less than 30, round again. 27 + 7 = 34, not less than 30, so leave the loop and output 34. (27 stops one pass early.)
6.The number 4 is put into this machine. What number does it output?
8
128
256
64
Show the answer
128. Double each pass and check: 8, 16, 32 and 64 are not more than 66, so the No arrow sends each one round again. Doubling 64 gives 128, which is more than 66, so the Yes arrow leads to the output: 128. (64 is so close to 66 that it is easy to stop there, and 256 doubles once too often.)
7.Which number makes this flowchart output "Bonus!"?
21
30
32
34
Show the answer
30. To reach "Bonus!" the number needs Yes at both diamonds: it must be even and less than 32. 30 is even and less than 32. 21 is odd. 32 is even but equal to 32, not less than it, and 34 is more than 32.
8.Which number makes this flowchart output "Door opens"?
5
17
10
20
Show the answer
20. The number needs Yes at both diamonds. 20 is a multiple of 5 and more than 10. 17 is not a multiple of 5. 5 and 10 are multiples of 5, but neither is more than 10 (10 is equal to 10), so both take the No arrow at the second diamond.
9.The number 3 is put into this machine. What numbers does it output, in order?
3
3, 12, 21, 30, 39
3, 12, 21, 30
3, 12, 21, 30, 39, 48
Show the answer
3, 12, 21, 30, 39. Here the output box is inside the loop, so a number comes out on every pass. Output 3, add 9 to get 12: not more than 40, so go back and output 12. The same happens for 21, 30 and 39. After 39 is output, 39 + 9 = 48, which is more than 40, so the Yes arrow goes to End before 48 can be output.
10.What number does the sprite say at the end of this script from a block-coding app?
27
26
18
22
Show the answer
18. The repeat runs 6 times, with n going 2, 3, 4, 5, 6 and 7. The if block adds n to stars only when n is more than 4, so 2, 3 and 4 add nothing (4 is not more than 4). Then 5, 6 and 7 are added: 5 + 6 + 7 = 18. (22 wrongly adds 4 as well, and 27 adds every value of n.)
Want more flowchart practice?
Inside ElevenReady your child gets hundreds more computing and wider-curriculum questions at the right
level, a short lesson before each new skill, and a parent dashboard that shows which skills are secure and
which need work. Start with 30 days free. No card needed.
Schools whose 11+ includes wider-curriculum questions
Wider-curriculum questions are part of the FSCE test used by the Gloucestershire grammar schools below, and
computing questions like these are practice for that breadth. GL-style tests do not include them, so most
children sitting a GL test will not see a flowchart question. The schools, with the subjects our school
directory lists:
Sir Thomas Rich's SchoolGloucester. FSCE: English, Maths and questions across the wider curriculum
Denmark Road High SchoolGloucester. FSCE: English, Maths and questions across the wider curriculum
Ribston Hall High SchoolGloucester. FSCE: English, Maths and questions across the wider curriculum
Marling SchoolStroud. FSCE: English, Maths and questions across the wider curriculum
Stroud High SchoolStroud. FSCE: English, Maths and questions across the wider curriculum
The Trafford grammar schools move from GL to FSCE for 2028 entry; check each school's admissions page for
whether its papers include wider-curriculum questions.
Subjects taken from our school directory in November 2026. Exam arrangements change, so
always check the school's own admissions page for the year your child applies.
Questions parents ask
What do the shapes in a flowchart mean?
A rounded box shows where the flowchart starts and ends. A rectangle is a step to carry out, such as doing a sum. Inputs and outputs often go in a parallelogram (a slanted box), although some flowcharts, like the ones on this page, use rectangles for them too. A diamond is a decision: it asks a question with a yes or no answer, and has one arrow for Yes and one for No.
What does selection mean in computing?
Selection means the program chooses what to do next by checking a condition. In a flowchart it is a decision diamond. In a block-coding app it is an if block (do this only if the condition is true) or an if-else block (do one thing if it is true and another if it is false).
When do children learn this at school?
In England, the Key Stage 2 computing curriculum asks pupils to use sequence, selection and repetition in programs, to work with variables and with input and output, and to explain how simple algorithms work. It does not set a year for each part, so schools cover it at different times in Years 3 to 6, often with a block-coding app.
Are flowcharts tested in the 11+?
Only in tests that include wider-curriculum questions, such as the FSCE test used by some Gloucestershire grammar schools. GL-style tests of English, maths and reasoning do not ask computing questions. Tracing a flowchart still trains careful step-by-step reasoning, which helps in every 11+ paper.