Coding with While Loops
A while loop is one of the most common types of loop. The main characteristic of a while loop is that it will repeat a set of instructions based on a condition.
If the condition is TRUE, the code inside it will keep repeating.
We use this kind of loop when we don't know the exact number of times a code needs to be executed.
While block is detected forward, destroy and move forward.
Build a bridge. While NOT block below, place block until reach land.
Three part problem: Tower, repeats and ladders
1. Build a tower, left, front and right. Repeat 10 blocks high.
2. Fall 10 blocks to the ground.
3. Build a ladder 10 blocks through the center of the tower.
4. Move a block forward.
With a partner or team of three.
Final task. Save the bears and bring the cub together with its family by joining the center mini iceberg with bridges using while loops.
Is this the route you are looking for?
Learning Intention:
Can I solve problems with code?
Success Criteria
I know how to sequence commands
I can test and debug
I can Block-program in Microsoft MakeCode.
I can solve problems through coding.
I can share and support my classmates
Teacher Resources
Educator Guide