Raspberry_Pi_Education_Manual

Notes:

Let’s have some fun with the cat

First, let’s give the cat something to say. We’ll start with “Hello, World”. This is generally the first thing a computer programmer learns to do (don’t ask me why). As you are now learning a programming language, you’d better start with “Hello, World”, too.

Making the cat talk

To make the cat say “Hello, World”, we’re going to be working with “ blocks ”. These are handy pieces of code, each containing an instruction for your sprite to follow. There are eight different types of block. These can be found in the top-left corner of the Scratch GUI. They are colour-coded, so remember the colours. Find out what they are and complete their names in the table below:

M...

C...

L...

S...

S...

O...

P...

V...

Now, follow these simple steps to make your cat talk:

1  Click on the cat sprite in the Sprites List (bottom right) to make sure that it’s selected.

2  Click on the “Looks” button in the Blocks Palette to make the Looks blocks appear.

3  Click on the block labelled “say [Hello] for [2] seconds” and drag it to the Scripts tab.

4  Replace “Hello” with “Hello, World”. Double-click the block and your cat should say: “Hello, World”.

A beginner’s guide to Scratch

10

Made with FlippingBook flipbook maker