class 7
class 7
SCRATCH
BLOCKS IN SCRATCH
The Scratch release comes with six different types of
block .
Hat Blocks
Stack Blocks
Reporter Blocks
Boolean Blocks
C Blocks
Cap Blocks
Hat Blocks
Hat blocks are used to start your scripts. Whether it’s the click of the green flag or the press of a
key, hat blocks wait for their specific event to occur before executing the rest of the blocks in the
script. These blocks are shaped like a hat, with a rounded top and a bump on the bottom. The
bump on the bottom controls which block types you can attach to it.
Stack Blocks
Stack blocks are used to perform the main tasks in your scripts. These blocks have a notch at the
top, and a bump at the bottom, allowing blocks to connect to the top and bottom of the block.
Some stack blocks have an area for you to add input information, and some have drop-down
menus with additional choices.
Reporter Blocks
Reporter blocks are used to report numeric, string, or Boolean values in your scripts. These
blocks are rounded at both ends, with a smooth top and bottom. They don’t connect to other
blocks but fit in blocks that require an input value. When you run your script, the reporter block
will be executed before the block it’s placed in is executed.
Boolean Blocks
Boolean blocks are used to pass conditional values in your scripts. These blocks will return a
“true” or ”false” value with a string comparison, or a “1” or “0” value with a numeric
comparison. Boolean blocks are shaped like an elongated hexagon but will fit in both their
corresponding hexagonal slots and some of the rounded reporter slots.
C Blocks
C Blocks are used to perform conditions and loops in your scripts. They’re shaped like a “C”,
with the opening sometimes referred to as the mouth of the block, where additional blocks in
your script can fit. Except for the forever block, each horizontal arm of a C block has a notch at
the top and a bump at the bottom. The forever block is the same as the other C blocks, except
that there’s no bump needed at the bottom of the block. Anything below the forever block would
never get executed.
Cap Blocks
Cap blocks are used to stop your script or project from running. These blocks resemble a stack
block with a notch on top, but they were designed without the bump on the bottom. You can’t
add any blocks below a cap block. You can, however, place the cap block inside of a C block as
shown in the example below. Any code below the C block would not get executed if the else
statement is executed, reaching the cap block.
EXERCISE
MULTIPLE CHOICE QUESTIONS
Q1:What is the function of ‘when green flag clicked’ command block?
a) Points sprite in specified direction.
b) If condition is true ,runs the block inside.
c) Runs the script.
Q2:What will happen if we place the blocks in the scratch at wrong
order?
a) The program will start working slowly.
b) The program will terminate.
c) The program will not work well.
Q3:What is the name of code blocks rounded or curved top and a
bump at the bottom?
a) Reporter Block
b) Stack Block
c) Hat Block
Q4:Name the code block that controls sprite placement, direction,
rotation, and movement .
a) Looks
b) Motion
c) Control
Q5:Identify the block given below.
a) Hat Block
b) Cap Block
c) C Block
True/False:
Q1: C Blocks are used to stop script___________
Q2: Reporter Blocks are rounded at both end_________
Q3
Q4: Hat Blocks are used to start script________
Q5: A sprite can move only in forward direction.____
PROJECT BASED ON SCRATCH
5.Using Text option .Write Start and Finish with red and black colour on the background.
5
2 3
B.SELECT A SPRITE
7.Select from motion block and drop this block under point
in direction Block.
22. Select from motion block for fixing the position so that
when sprite touches blue colour then game will start again.
If Sprite touch Black colour of finish point then GOOD JOB will
display
25. Select from motion block for fixing the position so that when
sprite touches black colour then good job will appear.
SAVING A PROJECT
To save your project ,follow these steps:
1.Click on the File menu in the menu bar and select the Save option
from the drop-down list.
2.Choose the location where you want to save your project ant type
a suitable name in the File name box.
1. Click on the File menu in the menu bar and select the Load from
your computer option from the list.
1
2
3
ACTIVITY
TIME