The_Official_Raspberry_Pi_-_Beginner’s_Book_Vol1,_2018 (1)

(singke) #1

(^58) THE OFFICIAL RASPBERRY PI BEGINNER'S GUIDE
Before moving on, name and save your program. Click on the File menu, then Save Project.
Type in a name and click the Save button (Figure 4-3).
5 Figure 4-3: Save your program with a memorable name
Next steps: sequencing
While your program has two blocks, it only has one real instruction: to say ‘Hello!’ every time
the flag is clicked and the program runs. To do more, you need to know about sequencing.
Computer programs, at their simplest, are a list of instructions, just like a recipe. Each
instruction follows on from the last in a logical progression known as a linear sequence.
Start by clicking and dragging the say Hello! block from the scripts area back to the blocks
palette (Figure 4-4). This deletes the block, removing it from your program and leaving just the
trigger block, when clicked.
WHAT CAN IT SAY?
Some blocks in Scratch can be changed. Try clicking on
the word ‘Hello!’ and typing something else, then click
the green flag again. What happens on the stage?

Free download pdf