Strobe Lights

Microbit and Connected Wire

We have used the Repeat blocks to make the same action happen more than one time. Now we want to explore the idea of NESTED repeats - what happens when we but one repeat block inside of another?

//Consider this Code
Repeat 5 
    Say Hello
    Repeat 2
        Say How Are You?
        

How many times will this code say Hello? How many times will this code say How are you?

We are going to use Repeat Blocks to "light up" each of the lights on the LED using the x and y coordinates. We need to create two variables and set their values equal to 0 when the program starts

On Start
    xPoint = 0
    yPoint = 0

This assignment and instructions taken directly from https://makecode.microbit.org/lessons/strobe-light/challenges

Last updated