Developing programs using sequence
Lesson details
Learning outcome
I can explain how sequence of a program affects the output it produces.
Key learning points
- Computers execute the instructions within a program in a sequential manner to produce output.
- Changes to the sequence of code affects the output.
Keywords
Sequence - the order of commands in a program
Debugging - the process of finding and fixing errors in code to ensure it works correctly
Common misconception
As long as all the necessary lines of code are present, the program will work, regardless of their order.
Computers run code line by line, in the order it's written. If you change the sequence, you're changing the steps the computer takes, and that will change the output.
Teacher tip
Discuss the order of traffic lights to demonstrate how sequence affects outcomes, similar to how it affects programs. Ask pupils to identify other similar sequences they encounter in their everyday lives.
Equipment
Pupils will need access to a device that can edit and run Python programs. Examples in this lesson use the RPF Code Editor https://oak.link/python-editor
Licence
Lesson video
Loading...
Prior knowledge starter quiz
6 Questions
Q1.What is input in a computer system?
Q2.What is output in a computer system?
Q3.Which of these is an example of input?
Q4.Which of these is an example of output?
Q5.What does the sequence in a program determine?
Q6.What Python code is used to take input from the user and store it in a variable called 'name'?
Assessment exit quiz
6 Questions
Q1.What is the process of finding and correcting errors in a program called?
Q2.Put these steps in order to produce the correct output from a program.
Q3.What does the sequence of a program determine?
Q4.What happens if the sequence of code in a program is incorrect?
Q5.What does debugging involve?
Q6.Why does the order of code in a program matter?
To help you plan your 10 computer science lesson on: Developing programs using sequence, download all teaching resources for free and adapt to suit your pupils' needs...
To help you plan your 10 computer science lesson on: Developing programs using sequence, download all teaching resources for free and adapt to suit your pupils' needs.
The starter quiz will activate and check your pupils' prior knowledge, with versions available both with and without answers in PDF format.
We use learning cycles to break down learning into key concepts or ideas linked to the learning outcome. Each learning cycle features explanations with checks for understanding and practice tasks with feedback. All of this is found in our slide decks, ready for you to download and edit. The practice tasks are also available as printable worksheets and some lessons have additional materials with extra material you might need for teaching the lesson.
The assessment exit quiz will test your pupils' understanding of the key learning points.
Our video is a tool for planning, showing how other teachers might teach the lesson, offering helpful tips, modelled explanations and inspiration for your own delivery in the classroom. Plus, you can set it as homework or revision for pupils and keep their learning on track by sharing an online pupil version of this lesson.
Explore more key stage 4 computer science lessons from the Programming: sequence unit, dive into the full secondary computer science curriculum, or learn more about lesson planning.