1
[the academy_of_code]
Irish Independent
Code at home!
Summer 2020
2
LEARNING SCRATCH CONTROLS
What is Scratch?
scratch.mit.edu
3
Let’s take a look at what opens up when we create a new project!
scratch.mit.edu
4
This is where our sprites (characters) live!
We can have many sprites!
SCRATCH SPRITES
5
This area is called the stage!
This is where we see the output once we have some code!
SCRATCH STAGE
6
This area is called our Blocks Palette!
Here is where we find the blocks of code that
we will use to make our characters do things!
SCRATCH BLOCKS
7
SCRATCH BLOCKS
8
SCRATCH CODING
Let’s look at how we add code!
We can drag and drop blocks that we want to the Scripts Area!
9
Learning About Some Specific Blocks!
Movement Block
Initialization Block
OUR FIRST SCRATCH BLOCKS
These are two blocks that we will use frequently!
There are several more blocks that we will learn about!
10
SCRATCH CONTROLS RECAP
Stage
Scripts Area
Sprites
Blocks palette
Backdrops
11
Over to you!
Go to
in a browser - Google Chrome / Internet Explorer / Edge / Safari / Firefox
Sign up for a free scratch account
scratch.mit.edu
GETTING STARTED WITH SCRATCH
12
Over to you!
Create a New Project:
scratch.mit.edu
GETTING STARTED WITH SCRATCH
13
Challenge
Find the following blocks of code:
Expert Tip!
�Use the colour of the blocks to help you find them in Scratch!
Over to you!
GETTING STARTED WITH SCRATCH
14
name
your
project
Very important: Name your Project - Use a descriptor
15
What is a descriptor?
16
click on
my stuff
Where is my project??
17
Saving your Work
To make sure we can save our work, make sure you have a scratch account for the next lesson!
SAVING YOUR WORK IN SCRATCH
18
What is Initialization?
Other Options for Initialization:
GETTING STARTED WITH SCRATCH
'Green Flag clicked' - to run your program
19
Challenge
Use the following blocks of code to make
your Sprite move in the Stage!
Expert Tip!
�Use the colour of the blocks to help you find them in Scratch!
Over to you!
GETTING STARTED WITH SCRATCH
20
What if you want your sprite to move more than once?
Look at this animation!
Scratchcat moves a few steps, then turns,�again he moves a few steps, then turns,�over and over till he’s completed a circle!
What if you want your sprite to do the same?
MAKING SPRITES MOVE IN SCRATCH
21
What if you want your sprite to do the same?
MAKING SPRITES MOVE IN SCRATCH
This is repetitive and inefficient!
We can use loops instead!
22
Loops!
�
What are loops?
23
Loops!
�
What are loops?
24
In programming, loops are used to repeat code
without needing to drag and drop or type them each time!
Expert Tips!
Computer programmers who needs to use the same lines of code many times in a program can use loops to save time.
�
The code blocks placed inside the forever repeat without stopping.
�
Loops!
�
25
Your Task
Create a scene similar to this one!
You will need:
Choose your Fish (or any sprite)!
Choose your Backdrop!
Start Adding Code
Expert Tip!
Fish
Save with the name
“Fish Loop”
�
26
Helpful Hints!
�
27
Helpful Hints!
�
28
Extra Challenges
It’s time to recreate this scene for the following themes! ��
SPACE!
Save with the name
“Space Loop”
�
SNOW!
Save with the name
“Snow Loop”
�
29