Both Scratch and the Makecode editor build on the Blockly library, a tool for visual programming. There are subtle differences in the code blocks for each editor that change the behaviour of the program.


Scratch

Makecode

Events wait for a user action, like clicking the green flag in scratch or pressing a button on the keyboard

 

Input waits for a user input like pressing the A button or shaking the micro:bit

Control is about the flow of your program tasks. In scratch you can add a forever, repeat or if block to an event to trigger it.

Makecode breaks controls into programming concepts. Forever is it’s own loop (it’s triggered as soon as the micro:bit is powered on).

Repeats are found in the Loops menu of Javascript Blocks

And if blocks are found in the Logic menu

 

Operators let you do arithmetic and make comparisons

Arithemetic and random number pickers can be found in Math, whereas a comparison between something and something else is found in Logic

Data lets you define variables that might change within your program. Here we have made a variable called item

We can define these in the Variables menu of makecode


Looks let you display actions on the screen, which  can be done by adding a say block. The word in the box is called a string

 

To show a word on the micro:bit display we can use show string, found in the Basic menu

Blocks that let you edit them have white backgrounds that you can type in for example operators have circular input areas    

Blocks that you can edit usually look like jigaw pieces and may already have an example in them, for example Math sums have a '0' in the block



There are many more differences and simialrities between Scratch and Makecode, if you would like to add some, please contact us