Click here to download this activity as a PDF worksheet to print out at home!

STEP 1: OPEN SCRATCH

To get started you will need to open a web based program called Scratch. Click this link or enter the text below into your browser’s address bar:

https://scratch.mt.edu/projects/113839424/#editor

When Scratch has opened you should see this:

You have two sprites shown on the left side of your screen - big duck and baby duck. Make sure the baby duck’s sprite is selected. Click on its thumbnail.

Hint: If the sprite is selected it will have a blue border around its thumbnail.

Click the green flag, and then press the space bar on your computer’s keyboard.

STEP 2: GET THE BABY DUCK MOVING!

When you press the space bar, the big duck starts moving but the baby duck only moves a little bit.

We need the baby duck to keep moving!

We can do this by putting the “move 10 steps” block inside a loop. Loops repeat the scripts inside them. They can repeat forever, or for a certain amount of times.

Can you add a loop block to get the baby duck moving? 

Look at the two scripts below.

Can you change the script to the correct one to get the baby duck moving continuously?

Once you have changed the script, click the green flag and then press the space bar again.

Does the baby duck keep moving?

STEP 3: GET THE BABY DUCK UNSTUCK!

Well done for getting the baby duck moving! But what happens when the baby duck reaches the edge of the screen?

It seems the baby duck is stuck and is not turning back around and instead seems to be climbing up the edge of the screen!

How might we get the baby duck unstuck and send him back in the other direction?

Look at the scripts below, which one might work?

Once you have changed your script, click the green  ag and then press the space bar again.

Does the baby duck turn around and keep moving once reaching the edge of the screen?

STEP 4: GET THE BABY DUCK MOVING IN THE CORRECT DIRECTION!

Baby duck is turning around, but isn’t moving straight across the screen as expected. Instead the baby duck is flying around the screen!

We need to debug our scripts and point the baby duck in the right direction!

Can you find the block below and put it in the script so that the baby duck points in the right direction when the green flag is clicked?

Hint: 90 is right, -90 is left, 0 is up and 180 is down.

Once you have added the block, click the green  ag and then press the space bar again.

Is the baby duck moving across the screen in the right direction now?

If the baby duck is moving back and forth across the screen like the big duck is, go to the next step!

STEP 5: GET THE BABY DUCK TO TURN AROUND!

The baby duck is moving back and forth across the screen like the big duck. But something still isn’t right. What is the big duck doing that the baby duck isn’t? 

The baby duck isn’t turning his body when he changes his direction!

Let’s debug our script to make the baby duck move his body.

Find the block below and put it in the scripts so that the baby duck’s rotation style is set when the green flag is clicked.

Which rotation style do you think you need to choose?

Once you have added the block - and set the correct rotation style, click the green flag and then press the space bar again.

STEP 6: MORE CHALLENGES!

Is the baby duck copying the big duck? If not, look at the image below to check that you have debugged the scripts correctly.

If so, congratulations! You have debugged your code and helped the baby duck follow the big duck!

Ready for more? See if you can complete the challenges below:

  • The baby duck needs to move faster
  • The baby duck needs to move up and down
  • The baby duck needs to move only after the up key is pressed
Did this answer your question?