9
CATCH SCRATCH! Programming from Scratch

CATCH SCRATCH! Programming from Scratch. Remember Scratch?

Embed Size (px)

Citation preview

Page 1: CATCH SCRATCH! Programming from Scratch. Remember Scratch?

CATCH SCRATCH!Programming from Scratch

Page 2: CATCH SCRATCH! Programming from Scratch. Remember Scratch?

Remember Scratch?

Page 3: 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

Page 4: CATCH SCRATCH! Programming from Scratch. Remember Scratch?

Step 1: Moving a sprite

• Add this code block to your cat sprite.

What do you think will happen?

Page 5: CATCH SCRATCH! Programming from Scratch. Remember Scratch?

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)

Page 6: CATCH SCRATCH! Programming from Scratch. Remember Scratch?

Step 3: Bounce!

• You can bounce off the edges…

Why do I go upside-down?

Page 7: CATCH SCRATCH! Programming from Scratch. Remember Scratch?

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)

Page 8: CATCH SCRATCH! Programming from Scratch. Remember Scratch?

Step 5: Count the catches

“catches” is a

variable(a number that can vary)

How many times can you catch

me?

Page 9: CATCH SCRATCH! Programming from Scratch. Remember Scratch?

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)