CS10-04 Computer Science Watch
Flowcharts
In this lesson
Flowcharts for GCSE Computer Science, with worked examples and the mistakes examiners report. AQA 8525, Edexcel 1CP2 and OCR J277 GCSE. Algorithms 4 of 9. More at https://scholafly.com
By the end: Name and draw the six standard flowchart symbols, follow a flowchart to find its output, and complete or draw a flowchart with every path connected, arrows on every flow line and exactly two labelled exits from every decision.
What it covers
- 0:00 Intro: flowcharts
- 0:33 Flowcharts: six standard shapes
- 3:02 Following a flowchart
- 6:38 Flowcharts: given labels
- 8:08 Drawing from a description
Key words
About this video
Flowcharts | GCSE Computer Science | CS10-04
Flowcharts for GCSE Computer Science, with worked examples and the mistakes examiners report.
AQA 8525, Edexcel 1CP2 and OCR J277 GCSE. Algorithms 4 of 9.
More at https://scholafly.com
Watch first: CS10-03 - https://youtu.be/uvNHZSc6E0E
Video code: CS10-04 (search "ScholaFly CS10-04")
#GCSEComputerScience #Algorithms #Flowcharts
For teachers
This GCSE Computer Science lesson teaches flowcharts. By the end, students should be able to name and draw the six standard flowchart symbols, follow a flowchart to find its output, and complete or draw a flowchart with every path connected, arrows on every flow line and exactly two labelled exits from every decision. It works through four worked examples and the mistakes examiners report.
Exam board specification references:
AQA 8525
- 3.1.1
Edexcel 1CP2
- 1.2.1
OCR J277
- 2.1.2
Read the transcript
A lift's plan says: check whether the lift has reached the floor, and if it has, open the doors. What is missing? Nothing, it seems. But it never says what to do when the answer is no, and written as words, that gap slips straight past. Drawn as a flowchart, a missing branch is a line going nowhere, so you can see the mistake at a glance.
A flowchart is a diagram of an algorithm, drawn with standard shapes joined by arrows, in the order the steps run. A terminal, the rounded box, marks where the algorithm starts and where it stops. A parallelogram, a box with slanted sides, shows data coming in or going out, the input and output from the video Inputs, processing and outputs. A rectangle shows a process, such as a calculation or a value being stored. A diamond asks a yes or no question, and it is the only shape with two ways out. A rectangle with double lines down its sides is a sub program, a separate set of steps defined somewhere else and run at this point. And the flow line, an arrow, shows the direction to go next. Courses give some of these shapes different names. One calls the rounded box start or end, and another calls it a terminal. The shapes are the same everywhere, so draw the shape right and the name follows. Which shape for each: store a total, ask if it is over ten, show the result? Storing a total is a process, so a rectangle. Asking if it is over ten is a decision, a diamond. Showing the result is output, a parallelogram. One test picks between those three. A step that asks a yes or no question is a diamond. A step that moves data in or out is a parallelogram. A step that changes data is a rectangle. One examiner's report names the slip that test prevents: "The common misconceptions are using processes for decisions and input/outputs." The fix is that test, run on every box before you draw it. Only a step that changes data goes in a rectangle.
Following a flowchart means putting values in at the start and obeying each shape in turn. This one inputs a and b, sets c to a plus b, then asks whether c is greater than six. The yes exit outputs one word, and the no exit outputs another. Put in a as three and b as four: big or small? Then a as one, b as two? Three plus four is seven, more than six, so the output is big. One plus two is three, which is not, so the output is small. Read the process box carefully and do the sum it says, because a wrong sum sends you down the wrong exit. Drawing needs three joining checks. An arrow goes on every flow line. Every decision has two exits, each labelled yes or no, or true or false. And every path runs from the start to an end, with nothing left hanging. Here is a flowchart for checking a mark against fifty, and it is joined up badly in three places. Which three joining checks does this flowchart break, and where? The line into the diamond has no arrowhead. The diamond has only one exit, and it is unlabelled. And the fail output box leads nowhere, so that path never reaches an end. Repaired: add the arrowhead, give the diamond a second exit and label both, and run the fail output into the end. One examiner's report lists the same three: "Some common errors included not showing directional arrows on flow lines, having decision boxes that did not have exactly two clearly labelled outputs and leaving hanging symbols." The fix is the three checks, ticked off on every flowchart you finish. A report on another paper records both halves: "The majority of candidates recognised the correct flowchart shapes to be used for a decision and many also were able to use the parallelogram shape for inputs and outputs. However, fewer correctly connected up the boxes to make sure that all paths started and ended at appropriate points and even fewer candidates labelled up the decision box appropriately with True or False or Yes or No." The habit: put a finger on the start and follow every route to an end. Several ends are allowed if every path reaches one, but one end, with every path brought to it, is the tidy way.
Some questions give you the words and ask you to put them in the right shapes. A door entry system's flowchart has gaps, and four labels are given to fill them. Where do input code, is code correct, open door and output try again go? Input code is a parallelogram, after the start. Is code correct is the diamond. Open door is a rectangle on the yes exit. Output try again is a parallelogram on the no exit, with an arrow back up to input code. One examiner's report, on a question like this, says: "Question 4.6 required the students to put some given labels onto a flowchart - some students wrote their own pseudocode which was not correct instead of using the statements given to them." Pseudocode is a half-English way of writing code, with its own video. The fix here: when the question gives you the words, use those words, in those shapes, and write nothing of your own.
Drawing from a description puts all of it together, including a loop, drawn as an arrow back up the flowchart. The task: ask for a password again and again until letmein is typed, then output Welcome. Draw the flowchart, then run the three joining checks on it. Draw the letmein password flowchart, with its Welcome output, before I show you. Start, in a rounded box. Then a parallelogram, input password. Then a diamond asking whether the password is letmein. The yes exit goes to a parallelogram, output Welcome, and then to the end. The no exit is an arrow back up to input password, and that arrow is the loop. Every line has an arrow, the diamond has two labelled exits, and every path reaches the end, so nothing hangs.
Shapes first, then the three checks, on flowcharts this video never drew. A step says input age. Which shape does it go in, and why? A parallelogram, because data is coming in. Now a decision box with three exits: which joining check does it break? Two labelled exits. A decision asks a yes or no question, so it has exactly two ways out. Another: one output box links to no end at all. Which check fails? Nothing hanging. Every path has to reach an end, so that box needs an arrow into one. Try the lift: which shape asks whether it has reached the floor, and where do its exits go? A diamond. Yes leads on to opening the doors, and no loops back to keep moving, the branch the lift's plan was missing.
This video takes its place in the chapter list. Tap the thumbs up once you are comfortable with it, and next time you can scroll past it; the ones left blank are the ones to come back to. Save it if the shapes are still slipping, and sketch one flowchart for something you do every morning, like making toast; drawing your own makes the shapes stick.
Next in the chapter: Pseudocode, writing the same kind of algorithm as lines of text. Hopefully that's next in your feed, but if not, search for ScholaFly C S ten, oh five.
Every other video is on scholafly.com too, easy to search by video code or by keyword. Whatever you're revising, go there and have a look, or, watch the next video.
Related terms
For: AQA GCSE 8525, Edexcel GCSE 1CP2, OCR GCSE J277
On the specification
For teachers
This GCSE Computer Science lesson teaches flowcharts. By the end, students should be able to name and draw the six standard flowchart symbols, follow a flowchart to find its output, and complete or draw a flowchart with every path connected, arrows on every flow line and exactly two labelled exits from every decision. It works through four worked examples and the mistakes examiners report.