Skip to Content

In what order does Scratch execute commands

In what order does Scratch execute the commands when they are placed in threads???

Students are exposed to the following Scratch project.

 

They are asked to execute every thread using double click. The result is that all the commands are executed sequentially and canonical polygons are drawn.

Canonical polygons

 

Then they are asked to use the green flag to run the program. The following shape is drawn.

 

A not canonical shape

Students are asked why this is the case.

In order to find out what "went wrong" they are shown the single stepping setting.

 

After that they should be able to recognize that "parallel" threads are executed in an arbitrary manner, and they may be able to correct the program in order to draw the canonical polygons.

 

This activity is summarized in this project (project made in greek).