Activity Sequence: Scratch

This is as an illustrative example for how Expression Tutor activities could be used in a Scratch course. The content on this page may not be understandable for someone without significant prior knowledge.

Atomic values in Scratch are not represented with a reporter block, but with a so-called shadow block.

Shadows

Scratch simplifies the representation of atomic expressions with shadows. Literal values, such as numbers and text, are entered directly into an input displayed in another block and are not represented with the traditional draggable reporter block. Students may not perceive literal values in Scratch as expressions.

Assume we build the following block in Scratch:

 
pick random
 
 
1
 
+
 
2
 
 
to
 
10
 
 

Below is a tree representation of the above expression. Both reporter blocks and shadows, used to represent literal values, are represented as nodes in the expression tree.

Boolean and Numbers

Scratch use different visual representation for expression blocks of different types. Numbers and text are represented with round-shaped blocks, while boolean are represented with hexagon-shaped blocks.

Assume we build the following block in Scratch:

 
10
 
>
 
20
 
or
 
30
 
=
 
30
 

Below is a tree representation of the above expression. Boolean blocks produces values of type boolean and in this case reporter blocks produces value of type number.

Empty Boolean Block

Boolean blocks can have empty shadows. The empty shadow in Scratch evaluates to the value false.

Assume we build the following block in Scratch:

 
or
 
30
 
=
 
30
 

Below is a tree representation of the above expression. The empty boolean block evaluates to the value false.