Y6
Overview Loops and Repetition
Repetition in Scratch -Pen Drawing in Scratch: Select the ‘add extension’ icon in the bottom
- Programming is when we make a set of instructions for left corner. Then select ‘pen.’ This allows you to draw with your sprites.
computers to follow. -The Repeat Block: Select ‘code’ and then the ‘control’ blocks (orange).
-Scratch is a program that we can use in order to code Here you will find the repeat block. It should be placed around the
our own stories, animations and games. We can use command blocks that you want to repeat. The number of times
repeat and loop operator blocks in order to make our something is repeated can be typed into the white area.
programs more logical and efficient. These help to run -Creating Shapes: Selecting ‘pen down’ (in the ‘operators’ blocks) can
code continuously or for a set number of times. be followed by use of the motion blocks to determine the line that will
-We use algorithms (a set of instructions to perform a be drawn (e.g. ‘move 10 steps’). Turning a number of degrees changes
task) to sequence movements, actions and sounds in the direction of the pen. Placing the repeat block around this motion
order to program effective animations. code can allow more complex shapes to be drawn.
-Count-Controlled/Infinite Loops: We can control the number of
‘loops’ of a command with the number typed into the ‘repeat’ block.
The Basics of Scratch
The ‘forever’ block makes a command continue infinitely (forever).
-What is Scratch? Scratch is a website/ app that lets us code our
own stories, games and animations.
Event Managing and Efficiency Algorithms, Trialling, Debugging
-Scratch helps us to learn how to use programming language,
whilst also being creative and using problem-solving skills. -We should ensure that programs are coded -Designing an algorithm (set of
and labelled in easy-to-understand, user- instructions for performing a task) will
Attributes: There are three attributes of friendly ways. help you to program the sequence that
There are three main areas in Scratch: the sprite which we can change to make you require.
our animation: Code, Costumes, Sounds. -Using the ‘events’ blocks -Programmers do not put their computer
-The Blocks Palette (on the -Event Blocks: logically can help to make your programs straight to work. They trial
left) contain all of the different Event blocks are coloured yellow and are programming easy to use. E.g. them first to find any errors:
blocks: puzzle piece commands used to sense different events when ‘s’ key pressed a square is drawn, when -Sequence errors: An instruction in the
which control the animation. that happen e.g., the green ‘h’ key is pressed a hexagon is drawn. sequence is wrong or in the wrong place.
-Code Area (in the middle) is flag being clicked.
where the blocks are placed to -Keying errors: Typing in the wrong code.
-Action Blocks: Action blocks include -Efficiency is about getting the right result in -Logical errors: Mistakes in plan/thinking.
create a program. ‘Motion’ blocks, ‘Sound’ blocks the easiest way possible, wasting little time or -If your algorithm does not
-Stage with Sprite (right) is where and ‘Looks’ blocks. They effort. Our use of the repeat and loop tools work correctly the first time,
the output of the program is make the sprite move, make should help to create efficient programs. remember to debug it.
presented. The sprite is the character. sounds and change appearance.
Important Vocabulary
Programming Scratch Blocks Commands Code Events Motion Sequence Trialling Debugging