Lesson 2.3: Beginning Motion in Scratch

Learning Objectives:
• Students will get acquainted with mazes and coding basics in Scratch and learnhow to program a character through a maze.
• Students will learn gain comfort with graphical programming, and dive into the thought process of coding.

Do Now:
Watch:

Explore:

Activity Part 1:
Scratch Blocks Review
• When Clicked - this is the first block Scratch reads when the green flag icon is clicked.

• Win - this block checks if the sprite is at the end position. If the sprite is at the end position, you win.
• Reset - this returns the sprite to the start position.

• Many blocks move the sprite in the cardinal directions:

• Up - this moves the sprite one block up.

• Down - this moves the sprite one block down.

• Horizontal Block - this moves the sprite a number of blocks in the vertical direction. Positive numbers move the sprite up. Negative numbers move the sprite down. For example, to move the sprite 5 blocks to up, type 5 into the block. To move the sprite 5 blocks down, type -5 into the block.

• Left - this moves the sprite one block left.

• Right - this moves the sprite one block right.

• Vertical Block - this moves the sprite a number of blocks in the horizontal direction. Positive number move the sprite to the right. Negative numbers move the sprite to the left. For example, to move the sprite 5 blocks to the right, type 5 into the block. To move the sprite 5 blocks to the left, type -5 into the block.
Activity Part 2: Motion in Scratch Explore Ocean World Activity Part 3: Motion in Scratch One Direction Scratch Lesson - Open One Direction from the link above and create the sequence of blocks illustrated below.
- Press the green flag to see this
script run.

-It has to have the "Win" block at the end to check if it is reached the end.
- If you do not reach the end, click the "Reset" block in the block menu to send the sprite back to the start.

Activity Part 4:
Motion in Scratch
• Using the "Up", "Down", "Left", and "Right" blocks do levels 1.21.31.4, and 1.5.
• Activity Part 5:
Repeating in Scratch

REPEATING

• Write the following code for "1.6 5x3".

• Note how it is incredibly long, so you can write the code below to do the exact same thing.

• The "Repeat" block allows anything inside to be repeated a certain number of times before going on. This makes the code a lot shorter.
Activity Part 6:

Up/Down/Right/Left

• Using "Up", "Down", "Left", "Right", and "Repeat" blocks, do levels 1.71.81.9, and 1.10.

Lesson 2.3 Wrap Up:

Reflection:
• Notice how the "Repeat" block makes the scripts considerably shorter than before.
• This basic command can be used to maneuver any sprite in Scratch. It will continue to be a fundamental piece in the rest of the puzzles.

Ċ
Michelle Cernuto,
20/04/2016, 16:33