OUCC

 
 
 

OUCC Tutorials

Blockly Maze Tasks


Example 2 - Using if blocks
The infinite or Repeat do loop block comes into its own when it is combined with some decision blocks.

Now we can wrap our code in a Repeat do block and ask the robot to make decisions: We can send the robot forwards unless it discovers it can turn left. If it can turn left, it should do and then go forward again.

See if you can use this algorithm to get the robot to the green square in the maze below.
(You are still allowed to use no more than 12 blocks.)

<< Back


Maze Tutorial Start
Example 1 - Using loops
Example 2 - Using using if blocks

Tutorials index


[ tutorials | terms | privacy | info@oucc.uk ]


UKCT Challenges are proud to use The Cuttle Platform to host our challenges.
The Cuttle system can be used for maths and science competitions, entrance exams or employee exams.