Loading...
Hello, my name is Mrs. Holborow.
I'm so pleased that you decided to join me for the lesson today.
We're gonna have lots of fun creating Scratch programmes that use sequence.
Welcome to today's lesson from the unit programming sequence using sound.
This lesson is called sequences, and by the end of today's lesson, you'll be able to explain that programmes run sequences which can be triggered by an event.
You'll need to have access to Scratch for this lesson, and it would be helpful to have your worksheet ready.
We will be exploring these keywords during the lesson.
Sequence.
Sequence, the order of commands in a programme.
Event.
Event, an input which triggers a block of commands to run.
Design.
Design to plan how something will look or work.
We will be using these keywords throughout today's lesson.
Okay, let's make a start with the first part of our lesson today by looking at how we can start a sequence of commands in different ways.
What is the difference between these two sets of blocks? Well done.
Yes, one set of blocks has been joined together.
In Scratch, blocks can be joined together vertically to create a sequence.
A sequence is a pattern or process where one thing follows another.
Here are some examples of sequences: some numbers and some musical notes.
Can you describe these sequences? These numbers are increasing by two each time, two, four, six, eight.
What would be next in the sequence? That's right, 10.
And these musical notes are in a sequence to play a tune.
Sam is asking whether you can think of any other examples of sequences.
Pause the video here and have a think.
Here are some more examples.
The alphabet, traffic lights, and a sequence of images that has been used to make a pattern.
Did you think of any others? Great job.
Let's check your understanding of sequences.
Fill in the blanks to complete the sentences.
A is a pattern or process where one thing follows another.
In Scratch, blocks can be together vertically to create sequences.
Pause the video and have a go.
What were the missing words? A sequence is a pattern or process where one thing follows another.
In Scratch, blocks can be joined together vertically to create sequences.
Did you get them right? Well done.
Look carefully at how the sprites move in this project.
The parrot moves when and the horse moves when.
Watch the animation carefully.
The parrot moves when the project is started with the green flag.
The horse moves when it is clicked.
Event blocks are used to start a sequence of commands.
These are all event blocks.
When green flag clicked, when this sprite clicked, and when space key is pressed.
An event is an input which triggers a block of commands to run.
These are the blocks in the project that you have just seen.
Notice that the event is at the top of the sequence of blocks.
These events will run blocks of commands when the green flag is clicked, the sprite is clicked, the space key is pressed.
Note that this doesn't have to be the space key.
It can be changed to any key.
Let's check your understanding of events.
Sam wants the parrot in her Scratch project to be flying across the screen when the project starts.
Which event should she use? A, when space key pressed, B, when this sprite clicked, C, when green flag clicked.
Pause the video and have a think.
Well done.
The when green flag clicked will make the parrot fly across the screen when the project starts.
Excellent work.
It's now time for you to have a go.
Create a new Scratch project and choose three of these sprites to add to your project.
Pause the video whilst you complete the step.
Now add a different event to each sprite.
You can choose from the following events: when green flag clicked, when space key pressed, or when this sprite clicked.
Pause the video whilst you complete the step.
Finally, can you explain the difference between the when green flag clicked and the when the sprite clicked event blocks and why they are needed? Have a think and record your answer on your worksheet.
Pause the video whilst you complete the task.
How did you get on? Which sprites did you decide to use? You were asked to explain the difference between the when green flag clicked event block and the when this sprite clicked event block.
Here is an example answer.
The when green flag clicked event will start a sprite when the project is started.
The when this sprite is clicked event block will only start when the sprite is clicked.
This is useful if you do not want the sprite to start straight away when your project is started.
You are doing so well.
We're now moving on to the next part of today's lesson where you'll create a design for a programme that uses sequence.
Oh no, Laura's programme isn't working as she expected.
She wanted the ladybird to eat the strawberry.
Laura is wondering why the ladybird didn't do as she expected.
Ah, here is Jacob.
Jacob is asking Laura if she created a design for her project first.
Jacob explains that a computer will follow a sequence of commands that you give it, so it's important to plan what you want to achieve.
A design is a plan to show how something will look or work.
It's a good idea to design a project before you start creating it.
This is because you can think about all the things you want your project to do, and then follow your design to achieve your goal.
It can also stop mistakes from happening.
Time to check your understanding.
It's a good idea to design a project before you start creating it, is this true or false? Pause the video and have a think.
Yes, it's true.
A design makes you think about all the things you want your project to do, and then you can follow your design to make them happen.
A design for a Scratch project will include the sprites you plan to use and what commands you will use to control them.
Take the example of planning an animation of animals in the wild.
The goal for the project is to show how the animal would move and behave.
The design will be broken down into steps.
Let's see those steps now.
The first step in our design is to choose the sprite you want to use.
Jacob is going to choose the parrot because it is an animal he thinks he can easily animate to show how it moves.
The next step is to choose which event you will use to trigger the commands to make your sprite move.
Jacob is going to choose the when this sprite clicked event, because he thinks it'll be easier to use.
The final step is to design which code blocks you will use to control the movement of the animal.
Jacob is going to choose the glide for one second to random position block as he thinks this would look like the parrot is flying.
Here is what the final design could look like.
Could you follow this to create a programme? Time to check your understanding of designs for Scratch projects.
Which of these would not be part of a design for a Scratch project? A, the sprites you plan to use, B, the results from testing your programme, C, the events that will be used to start commands, or D, the code blocks you plan to use.
Pause the video here and have a think.
That's correct, B, the results from testing your programme would not be in your design, as you would not have created your programme yet, so wouldn't be able to test it.
From task A, you have a project which has three sprites, which all use a different event block.
You now need to add a sequence of instructions to control the motion of each sprite.
Use the table on your worksheet to design the sequence of motion blocks for each of your sprites from Task A.
Think carefully about the animals you have chosen and how they would move.
You can also think about how the animals may interact with each other.
Pause the video to complete the task.
Check your design meets the requirements by using the criteria on your worksheet.
Add a tick or a cross to each item.
Have you included three sprites? Do they start with three different events? Is there more than one movement command for each sprite to create a sequence? Pause the video here and complete the task.
How did you do? Does your design meet all of the criteria? Here is an example of a completed design.
The parrot will move 10 steps and then turn 15 degrees each time the sprite is clicked.
You are doing a great job.
It's now time for the final part of today's lesson.
You are going to create a programme from a design.
The order of a sequence and the commands a programme is given are very important.
Accurate commands ensure a programme responds in the way that it is designed to.
A programme will only follow the commands that it is given.
Time for a check.
Sam wants the frog in her project to move 20 steps and then turn clockwise 15 degrees.
What is wrong with her code? A, the turn command is turning the wrong way, B, the order of the sequence is wrong, or C, the move does not have enough steps.
Pause the video here and look carefully at the code.
That's right, B is correct.
The order of the sequence is wrong.
The move 20 steps should come first.
Sometimes you can follow your design and the programme still doesn't do what you want it to do.
Oh, no, Sam says the ladybird in her project doesn't move far enough.
Andeep suggests going back to the design and adding a move block with a greater number of steps.
Let's check your understanding of sequence.
This project uses three motion blocks in a sequence.
Look carefully at the programme and then decide which set of commands have been used.
Pause the video and have a think.
That's right, B is the sequence that has been used.
The penguin goes to a random position, turns clockwise 15 degrees, and then moves 50 steps.
Okay, it's now time for the final task of the lesson.
Follow the design you created in task B to create your project.
If you didn't quite finish your design, you can follow the one that is on the screen.
Pause the video and complete the task.
Check your project meets the requirements using the criteria on your worksheet.
Add a tick or cross to each item.
Have you included three sprites? Do they start with three different events? Is there more than one movement for each sprite to create a sequence? Pause the video here and complete the task.
Does your programme match your design? Did you have to make any changes? If so, why? Pause the video here to complete the task.
How did you do? Did you enjoy creating your project? Well done.
You were asked whether your project matched your design.
Here is an example answer.
I followed my design to create my project.
I tested it and the parrot did not move close enough to the crab.
I changed my design by increasing the number of steps the parrot moved and this solved the problem.
Well done.
You have done brilliantly this lesson.
Here is a summary of what we have learned.
Code blocks can be joined together to create a sequence of commands.
Events are used to trigger a sequence of instructions.
A design can be created to plan how something will look or work.
Thank you for joining me this lesson.
I hope to see you again soon.
Bye.