1 of 29

1

[the academy_of_code]

Irish Independent

Code at home!

Summer 2020

2 of 29

2

LEARNING SCRATCH CONTROLS

What is Scratch?

  • A block-based programming language
  • Used by millions of students around the world
  • Scratch allows us to make awesome projects and games while learning about coding!

scratch.mit.edu

3 of 29

3

Let’s take a look at what opens up when we create a new project!

scratch.mit.edu

4 of 29

4

This is where our sprites (characters) live!

We can have many sprites!

SCRATCH SPRITES

5 of 29

5

This area is called the stage!

This is where we see the output once we have some code!

SCRATCH STAGE

6 of 29

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 of 29

7

SCRATCH BLOCKS

8 of 29

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 of 29

9

Learning About Some Specific Blocks!

Movement Block

  • Found in
  • Used to make our sprites �move!

Initialization Block

  • Found in
  • Used when we start coding!

OUR FIRST SCRATCH BLOCKS

These are two blocks that we will use frequently!

There are several more blocks that we will learn about!

10 of 29

10

SCRATCH CONTROLS RECAP

Stage

Scripts Area

Sprites

Blocks palette

Backdrops

11 of 29

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 of 29

12

Over to you!

Create a New Project:

scratch.mit.edu

GETTING STARTED WITH SCRATCH

13 of 29

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 of 29

14

name

your

project

Very important: Name your Project - Use a descriptor

15 of 29

15

What is a descriptor?

16 of 29

16

click on

my stuff

Where is my project??

17 of 29

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 of 29

18

What is Initialization?

Other Options for Initialization:

GETTING STARTED WITH SCRATCH

'Green Flag clicked' - to run your program

19 of 29

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 of 29

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 of 29

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 of 29

22

Loops!

What are loops?

23 of 29

23

  • Found in
  • Used to make something happen endless number of times
  • Found in
  • Used to make something happen X number of times
  • Found in
  • Used to make something happen till a condition is met

Loops!

What are loops?

24 of 29

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 of 29

25

Your Task

Create a scene similar to this one!

You will need:

  • One Sprite
  • One backdrop
  • Some code!

Choose your Fish (or any sprite)!

Choose your Backdrop!

Start Adding Code

  • Start with an Initialization Block
  • Use loops!

Expert Tip!

Fish

Save with the name

“Fish Loop”

26 of 29

26

Helpful Hints!

27 of 29

27

Helpful Hints!

28 of 29

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 of 29

29

Now that you have got your code journey started

there is loads more at:

taoc.ie