These resources have been reviewed and selected by STEM Learning’s team of education specialists for factual accuracy and relevance to teaching STEM subjects in UK schools.

Lesson 4 - More branches

This lesson progresses to multi-branch selection, then introduces while, the general-purpose iterative structure available in Python.

Students will explore problems that will allow them to deepen their comprehension of when and how selection should be used. For example, they will build programs that check the weather conditions where they are living and display appropriate responses. They will also be introduced to iteration, making sure that they understand the mechanics of how it works, before they go on to build their own iterative programs in the next lesson.

At times, students will import and use functions from ‘home-grown’  modules, i.e. modules that have been created exclusively for the purposes of the lesson. This will give them an insight into how a text-based language can be more powerful than block-based languages, without placing additional cognitive burden on them.

This lesson is the fourth in a six session teaching unit provided by the National Centre for Computing Education.


Show health and safety information

Please be aware that resources have been published on the website in the form that they were originally supplied. This means that procedures reflect general practice and standards applicable at the time resources were produced and cannot be assumed to be acceptable today. Website users are fully responsible for ensuring that any activity, including practical work, which they carry out is in accordance with current regulations related to health and safety and that an appropriate risk assessment has been carried out.

Information on the creators and permitted use of this resource is covered by the Category Six Materials - Community Resources section in STEM Learning’s Terms and conditions