Session 3 - Complex Routes
Learn how to build up solutions to complex loop problems by writing out longhand and then searching for patterns to repeat
Lesson guide
Introduction (10 mins)
Show level 23 and ask pupils what they notice. You are looking for pupils to notice the pattern. Ask them to think back to last session and what might help them here (loops).
Indicate the
repeat
block and make sure the pupils realise that they can change the number inside to change the number of times the code repeats.Ask pupils how they can use the patterns in this route with loops.
If pupils are unsure, allow a long solution without loops; then look for a pattern that repeats
If pupils suggest a less optimal solution than the one below, try it and lead them to a shorter solution through questioning and looking for a bigger pattern
Extension: Can they complete the level using three loops only? See the solution below:
Unplugged Activity (15 mins)
Look at level 24 together on the IWB
First, ask the pupils to tell you the solution without using
repeat
Then hand out a printed copy of this solution and a printed sheet for the level and ask pupils to shorten that code using loops
Assess children’s learning by asking them to predict the code needed for this level without using the computers
Ask pupils to try their predicted routes on the Rapid Router program and indicate if they had the predicted route correct
Pupils should record if their algorithm was correct and what their score was
Paired Activity (15 mins)
• Pupils complete levels 24 - 25 in pairs
• More confident pupils can move ahead to level 28, allowing others to master levels 24 and 25
Unplugged activity - extension
Give gifted and talented children a resource sheet on nested repeat, with this code, and ask them to draw the route. The solution is shown here:
Share and Review (10 mins)
Explain that next time you are going to look at Loops with conditions.
What did pupils find difficult?
How did they solve their problems?
Last updated