← Teacher guide Markdown for Prepare

Trust: cheat sheet

Secret messages · Find each block in the MakeCode toolbox (the category is at the end of each line).

pause

Waits before the next block. 1000 ms is one second. Basic › pause.

basic.pause(500)
The block

else if

Another question, asked only if the ones above were false. The first true one wins.

} else if (condition) {
The block

radio send value

Sends a name and a number by radio, such as bin and 1. Radio.

radio.sendValue("bin", 1)
The block

if else

Exactly one part runs: the first when the condition is true, else the second. Click + on an if block.

if (condition) {
    blocks
} else {
    blocks
}
The block

pick random

A random whole number from the first to the second, both included. Math.

randint(0, 10)
The block

on radio received value

Runs each time a name and number arrive by radio. Radio.

radio.onReceivedValue(function (name, value) {
    blocks
})
The block