1 of 13

Lesson 8: Fly cat, fly!

Year 7 - Programming essentials in Scratch: part II

2 of 13

Predict

Starter activity

Think, pair, share

This code is for a sprite called building.

Make a prediction about what might happen to the building when this code is executed.

3 of 13

Lesson 8: Fly cat, fly!

Objectives

In this lesson, you will:

  • Identify where condition-controlled iteration can be used in a program
  • Implement condition-controlled iteration in a program

3

4 of 13

Run

Activity 1

With a partner, run the Scratch code at the link provided.

  • Were your predictions correct?
  • Did anything surprise you about the code?
  • Did you miss anything out?

5 of 13

Investigate

Activity 2

  • Open the ‘Investigate the code’ worksheet
  • Complete the first three questions with your teacher

6 of 13

Investigate

Activity 2

What is the following block of code being used for?

What happens when you set x to 50?

Remember to change x back to 280

7 of 13

Investigate

Activity 2

What is the following block of code being used for?

What happens when you change x by -30?

Remember to change it back to -10

8 of 13

Investigate

Activity 2

How do these two blocks relate to each other?

9 of 13

Investigate

Activity 2

  • Complete the next four questions with your partner
  • Then complete the rest of the questions on your own

10 of 13

Modify: A pair programming activity

Activity 3

  • Open the ‘Modify the code’ worksheet
  • Complete the activities to add gravity to Scratch the cat
  • Remember to switch roles every five minutes

Explorer task

  • Use the tips from the bottom of your worksheet to further extend your game

11 of 13

Explain how each condition-controlled iteration (loop) works

Plenary

12 of 13

Next lesson

Summary

In this lesson, you…

  • Identified where condition-controlled iteration can be used in a program
  • Implemented condition-controlled iteration in a program

Next lesson, you will…

  • Evaluate which type of iteration is required in a program

12

13 of 13

Homework: Repeat until loops

Homework

Complete the homework questions on the sheet provided

13

Due: Next lesson