Page 71 - 2616_V iCode_C-4
P. 71
Block Name Shape Function
C-Block This block loops the other blocks within it. It
is also called a wrap block. This block is also
C shaped used to repeat an action.
Cap Block This block stops the script from functioning.
It is shaped in such a way that no other block
Notch at the top
can be placed below it.
and flat bottom
Scratch blocks are divided into different categories based on their functions. In most
of these blocks, you can change the value in the block to suit your script. Let us learn
about these blocks in detail.
Motion Blocks
Motion blocks are used to control the movement of a Sprite. They are blue in colour.
Some motion blocks need values for coordinates and directions.
Coordinates Y
Coordinates are numbers that represent 3
the exact location in the form of (X,Y) 2 (2,2)
coordinates, X is the Sprite’s horizontal (-2,1) 1
position. The Y-coordinate is a Sprite’s X
vertical position. X and Y coordinates when -3 -2 -1 -1 (0,0) 1 2 3
written together indicate the exact location -2
or position of the Sprite on the stage. -3
While writing coordinates, the
X-coordinate always comes first,
and the coordinates are separated
by a comma. For example, an X-
coordinate of 2 and a Y-coordinate
of 2 would look like this: (2, 2). In
the very centre of the Stage is a
point marked (0, 0), which is called
the origin.
In the same way, Scratch determines the positions on its screen. Positions are known
as pixels in Scratch. The ‘X’ and ‘Y’ positions in Scratch are used to determine the
location of a Sprite (object) on the stage.
Blocks in Scratch 69

