Beginner Coding with Blocks
Chapter
>
Level
Loops and Repetition
More complex looping
Objective
Walk through field and water crops on your way to the exit while only using no more than thirteen (14) blocks.
To complete this level using thirteen (14) or less blocks you must use either the repeat block or while loop block.
Use the: move forward, turn left, turn right blocks inside the loop to move through the field. Along the way, use the water block when standing on an X mark and facing crops to water them.
Remember, loops work like this:
-
While loop block: Use a variable like
count, set it to0, then use awhileloop block with a comparison to check ifcountis less than a number. Place your blocks inside thewhileloop block, and usechange count byto increase it by1. -
Repeat block: Use the
repeatblock and set the number of times you want to repeat. Place your blocks inside therepeatblock.
Use whichever loop you like, both are available in the block editor.