Lessons written by expert teachers in England, each with slides, a video and quizzes.
Their topic:
Programming: iteration · Programming: selection
For your topic:
Programming Concepts · Computer Science - 9210
Use these lessons alongside our lesson note, which covers your syllabus in full.
What this covers in your syllabus
Use, understand and know how the following statement types can be combined in programs:Not covered here. Our lesson note covers it.
variable declarationNot covered here. Our lesson note covers it.
constant declarationNot covered here. Our lesson note covers it.
assignmentNot covered here. Our lesson note covers it.
iterationNot covered here. Our lesson note covers it.
selectionNot covered here. Our lesson note covers it.
subroutine (procedure/function).Not covered here. Our lesson note covers it.
Use definite and indefinite iteration, including indefinite iteration with the condition(s) at the start or the end of the iterative structure.Taught inLesson 3: While loops
Nested loops involve placing one loop inside another.
The outer loop controls how many times the inner loop repeats.
Each time the outer loop is repeated, the inner loops are re-entered and started again as if new.
Keywords
nested loop
the process of placing one loop inside another loop
outer loop
the loop that contains another loop inside it
inner loop
the loop that is placed inside another loop and runs completely each time the outer loop runs once
A common mistake
Mistake:Learners may think that the inner loop only runs once per program, rather than repeating fully each time the outer loop runs.
In fact:The inner loop runs completely every time the outer loop runs once. This means the code inside the inner loop is repeated multiple times depending on how many times the outer loop is executed.
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.Read the licence
Lesson 2 of 3 · GCSE level, ages 14 to 16
Nested selection
By the end:I can trace and modify code in a program that uses nested selection.
Selection statements with conditions can be nested inside another selection statement.
Nested selection statements are used to implement complex branching logic.
If a condition of a main selection block evaluates to True, it leads to sub-conditions which are inside the main block.
Keywords
nested selection
a block of code where a selection block is placed within another selection block
A common mistake
Mistake:A nested selection statement can only have one nested selection block.
In fact:Selection statements can can continue to be nested in further selection blocks to provide more complex conditions for which specific code will be executed.
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.Read the licence
Lesson 3 of 3 · GCSE level, ages 14 to 16
While loops
By the end:I can use iteration controlled by a condition to repeat sequences of code.