0% found this document useful (0 votes)
42 views19 pages

Lesson 2 BUILDING BLOCKS

Uploaded by

sanguesamara85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views19 pages

Lesson 2 BUILDING BLOCKS

Uploaded by

sanguesamara85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

BUILDING BLOCKS

LESSON 2
TOPICS & AGENDA
01 Block Categories in Scratch

02 Block Shapes

03 Coding in Scratch
BLOCK CATEGORIES
IN SCRATCH
BLOCK CATEGORIES
EXTENSIONS

Extensions are a class of blocks


that add more features to the
default Scratch functions. Some of
these blocks were part of the main
block categories in previous
versions of Scratch.
EXTENSIONS
BLOCK SHAPES
Do you notice anything
about the blocks?

That’s right—some blocks are shaped differently from


others. This is because, aside from their color, Scratch
uses the
shape of each block as a way for us to tell what it can
do.
COMMAND BLOCKS
❑ Command blocks, also called stack blocks, are by far the most
common type of block shape.
❑ A command block has a notch on top of the block, and a node at the
bottom that joins with other blocks.

❑ Command blocks do not belong to only one category. The image on


the right shows command blocks from
the Motion, Sound and Sensing
categories.
TRIGGER BLOCKS
❑ Trigger blocks tell Scratch that you are about to start creating your
project and to look out for a specific event—if the Start button is
clicked, the sprite is clicked, or a particular button is pressed—and
once that happens, Scratch will run all the blocks underneath it.

❑ Trigger blocks are placed on top of a stack of blocks and have a


domed upper side instead of the notch found in command blocks; for
these reasons, they are also called Hat blocks.

Note: You won't be able to place any blocks on top of Trigger/Hat


blocks.
TRIGGER BLOCKS
❑ Trigger blocks make up most of the Events Blocks, except for the “When I start
as a Clone” block, which is under the Control category.
FUNCTION BLOCKS
❑ Function blocks are a special class of Scratch block. They can change the way
some stack blocks behave and work in the context of a script.

❑ Unlike other Scratch blocks, function blocks cannot be placed over or under other
stack blocks to use them in a script. They are instead dropped into input gaps, called
parameters, found on many stack blocks.
FUNCTION BLOCKS
❑ There are two kinds of Function blocks in Scratch: Reporter
blocks and
Boolean blocks. The Operators category is made up entirely of
these two
kinds of blocks.
⮚ Reporter blocks contain values of any kind. These values can be
numbers or even strings of data. They will fit in inputs that require
values. Study the following example.
FUNCTION BLOCKS
⮚ Boolean blocks, on the other hand, compare and check for the validity
of
conditions instead of holding values. Their name and design are taken
from
Boolean flowchart elements, which also do the same thing.
CONTROL BLOCKS
❑ Like Function blocks, there are two types of Control blocks that you can
use in
Scratch. The first kind, C Blocks, are so named because of the opening, or
mouth, on one side that allows users to put blocks in, making them look like
the letter C.
A C Block wraps around a stack of blocks, with its condition affecting all of
them.
⮚ There are five C
Blocks
in Scratch, as shown in
the image.
CONTROL BLOCKS
Three of the C Blocks allow you to create looping statements.

The Repeat [] C Block loops all of its contents by the number of times
you specify in the parameter.

The Repeat until [] requires a condition to be placed in the parameter


that Scratch will look for before it terminates the loop.

As the name implies, the Forever C Block continuously and repeatedly


executes all of the blocks placed inside it, even if it is nested inside of a
block with a specific number of cycles.
CONTROL BLOCKS
Meanwhile,
the If [] Then and If [] Then, Else blocks tell
the editor to check for a particular condition and
perform a specific action if that condition is met.
The Else section, meanwhile, specifies what will
happen if the condition is not met.
CONTROL BLOCKS
Cap blocks are the other kind of Control Block in Scratch. They stop a script
or a project from running. It has sub-options that, once selected, change the
block’s shape accordingly.
Thank you :)

You might also like