CATCH SCRATCH! Programming from Scratch. Remember Scratch?

Preview:

Citation preview

CATCH SCRATCH!Programming from Scratch

Remember Scratch?

Learning Cycle Outcome & Objective

Outcome

• Create a simple game called “Catch Scratch!”

Objective

• Know the basics of the following computer programming concepts:

1. Loops (iteration)

2. Selection

3. Variables

Step 1: Moving a sprite

• Add this code block to your cat sprite.

What do you think will happen?

Step 2: Moving Forever

• Use the forever block to create a loop

What is different

now?

This forever block creates

a loop(it happens lots of times)

Step 3: Bounce!

• You can bounce off the edges…

Why do I go upside-down?

Step 4: Click to catch…

• Add an IF block…

What should I say when I

get caught?

This if block is called a

selection(it only happens IF it is true)

Step 5: Count the catches

“catches” is a

variable(a number that can vary)

How many times can you catch

me?

Advanced Challenges

a) Can you make Scratch face in a random direction before moving?

b) Can you make Scratch jump to another place on the screen after being caught?

c) Can you make Scratch speed up after being caught? (Tip: try use another variable called speed)

Recommended