Year 4, started their computer science topic by examining examples of repetition in day-to-day life; they were introduced to the notion that, whilst humans excel with creative and ever-changing tasks, computers are better at solving problems in which the same process needs to be repeated many times. They then considered how computers are embedded all around us, automating tasks to help us with everything from crossing the road to washing our clothes.
During the term, Year 4 have completed a series of coding challenges that are designed to teach them that not all repetition is the same, and that we need a series of different loops in our coding toolbox to help us solve each unique task as efficiently as possible:
- for loops for tasks with a set number of repetitions,
- forever loops for tasks that repeat indefnitely, and while loops for tasks that repeat until a condition is met.
Year 4, also explored functions and how they are used to tackle problems with unpredictable repetition. The children then explored the question: ‘how can code help us to solve repetitive problems?’. Pupils used this question as a starting point to write their own program. Each pupil created an app that responded accurately to the unknown orders that were placed by their peers, whilst producing the items they requested using as few lines of code as possible!