29. No need for numbers.
30. Can you do that again?
31. Practice makes perfect
32. Uh oh, it’s ‘until’ fever!
Understand selection using the if... do... statement
Understand that you can use an if statement inside a repeat loop
Use this knowledge to create short, efficient programs to complete simple single routes
Note: Although else if is not introduced until Session 5, solutions using this statement will still get a full score.
33. Now it’s time to try the ‘if’ block.
34. Multiple 'ifs'
35. Let's pull it all together
Understand selection using the if... do... statement
Understand that you can use an if statement inside a repeat loop
Understand the idea of a general solution, e.g. a program which works for any single road
36. What else? ‘if-else’, that’s what!
37. A bit longer.
38. Third time lucky!
To understand why their general solution for a single route may not work on a complex route with junctions
To understand the if… do… else if… statement
To understand that the order of the if statements in your program makes a difference
Note: At Level 39, a solution using if and else if will work, but in this case it is not the most efficient solution
39. Third time lucky!
40. Adjust your previous solution.
41. Decision time.
42. What do you think this time?
43. Good work! What else can you do?
move forwards
repeat until... at destination
turn left
turn right
repeat until... at destination
move forwards
turn left
turn right
repeat until... at destination
move forwards
turn left
turn right
repeat until... at destination
move forwards
repeat until... at destination
if... do...
move forwards
turn left
repeat until... at destination
if... do...
move forwards
turn left
turn right
repeat until... at destination
if... do...
move forwards
turn left
turn right
repeat until... at destination
if... do...
Extension:
if... do... else if...
move forwards
turn left
turn right
repeat until... at destination
if... do...
Extension:
if... do... else if...
move forwards
turn left
turn right
repeat until... at destination
if... do...
Extension:
if... do... else if...
move forwards
turn left
repeat until... at destination
if... do...else if...
move forwards
turn left
turn right
repeat until... at destination
if... do...else if...
move forwards
turn left
turn right
repeat until... at destination
if... do...else if...
move forwards
turn left
turn right
repeat
move forwards
turn left
turn right
repeat
if... do... else if...