Code Haven Week 2

 

Topics: Conditionals, Character Movement

Topics: Conditionals, Character Movement

Week 2 Overview

Objectives

  • Introduce conditionals
  • Practice using conditionals in Scratch

Materials and Resources

Lesson Plan Overview

View our detailed lesson plan here.

  • Introduction (10 min): Icebreaker and review of last week
  • Unplugged Activity (10 min): Card game activity!
  • Live Coding (5 min): Demonstrate how to use conditionals in Scratch
  • Worksheet (25 min): Log into Scratch accounts and work on the worksheet
  • Wrap up (5 min): See how conditionals fit with the maze activity

Video Materials

We’ve produced exciting videos that go over the topics outlined in our lesson plan. These can serve as inspiration for how you could conduct your lessons. If you or the students don’t have time to watch the videos…check out our quick cheat sheet.

Worksheet

Part 1: Cats on the Run!

Let’s make the Scratch Cat run away from the mouse pointer!

image #1

  • First, set up the program so that it starts when we click the flag and runs forever.

  • Then, create a conditional that runs if the pointer gets too close to Scratch.

  • Finally, complete the conditional to make Scratch run away from the pointer!

Here’s a block bank to get you started!

block bank #1

Part 2: A Wild Cat Chase!

Let’s make the Scratch Cat run towards the mouse whenever it’s held down! Whenever the user lets go of the mouse, Scratch should spin around!

image #2

- Again, set up the program so that it starts when we click the flag and runs forever.

- Next, create a conditional that runs if the mouse is held down.

- Finally, complete the conditional to make Scratch run to the pointer or spin around!!

Here are the blocks you should use!

block bank #2

Part 3: Upside-Downsizing!

Let’s make Scratch grow or shrink when we press the arrow keys!

image #3

- One more time, set up the program so that it starts when we click the flag and runs forever.

- Now, create two conditionals: one that runs if the up arrow, and one that runs if the down arrow is pressed.

- Finally, complete the conditionals to make Scratch grow or shrink!

Here’s one more block bank, but beware! You might need to use some of these twice!

block bank #3

Questions to Discuss

How do conditionals fit into our maze game?

What else can you imagine doing in Scratch with conditionals?

Where do you see conditionals in your daily life?