Loading...
Hello, my name's Mrs. Powell and welcome to Computing.
I'm so pleased that you decided to join me today.
In today's lesson, we are going to be learning how a sequence of commands can lead to an outcome.
I can't wait to get started.
Let's go.
Welcome to today's lesson in the unit, "Building sequences in programmes." This lesson is called, "Outcomes of Sequences" And in today's lesson we're going to be learning to predict the outcome of a sequence.
We'll be using these keywords throughout today's lesson.
Let's take a look at them.
Outcome.
Outcome.
This means the end result of a programme.
Prediction.
Prediction.
What you think will happen.
This lesson is split into two sections.
The first section will be looking at predicting outcomes.
In the second section, we'll be matching outcomes.
Let's get started with predicting outcomes.
Predicting outcomes.
When you do something, there is an outcome.
When you clap your hands, you make a noise.
When you clap your hands, the noise is the outcome.
When you kick a football, what is the outcome? Pause the video to have a quick think.
When you kick a football, the football moves.
When you kick a football, the football moving is the outcome.
It is the end result.
When you follow a sequence of instructions, there is an outcome.
So let's look at these instructions.
Number one, first, get a cup.
Number two, next, pour in some squash.
Number three, add water.
What do you think the outcome will be? What will be the end result of these instructions? Well done for having a try.
The outcome is a cup of squash.
When you follow the instructions, get a cup, pour in some squash and add water, the end result is a cup of squash.
Predicting outcomes.
Let's try and predict the outcome from these instructions together.
If you mix butter, flour, eggs, and sugar together and cook them in the oven, what will the outcome be? Have a think.
Well done.
Did you think it was a cake? Yes, if you mix all of those ingredients together and cook them in the oven, the outcome will be a delicious cake.
When you run a programme in ScratchJr, it follows a sequence of commands, just like a sequence of instructions in real life.
This leads to an end result.
Here in the screenshot, you can see a sprite.
This sprite is a chicken and there is a cityscape background.
At the bottom, you might have noticed some command blocks.
Let's take a look at them.
A prediction is what you think will happen.
You can predict the outcome of a programme in ScratchJr by looking at the command blocks.
What command blocks do you see here? Do you see a start block with a green flag? Can you see a movement block? And there's a number underneath.
It says 16.
And at the end, do you see an end block in red? What is the outcome when the programme is run? Let's take a look and see what happens.
My sprite moves across the screen.
The outcome is that the chicken moves 16 steps along the road.
Well done.
You're doing really well.
Let's look at some other command blocks in ScratchJr.
The grow and shrink blocks are in the pink looks category.
The values on these blocks will change the amount a sprite will grow or by how much a sprite will shrink.
Here in the grow block, the value is two, and here in the shrink block, the value is also two.
Well done.
Let's have a little look at a sequence of commands.
What do you think the outcome will be? I can see here there's a yellow start block with a green flag.
And it looks like here, right next to it in pink there's a grow block and it has a value of two.
Next to that, there is a movement block and that has a value of one.
We can keep reading our blocks from left to right just like we read sentences.
Have a little look by yourself.
What do you think the outcome will be? Well done for having a try.
I'm going to tap on the green flag and we'll see what happens.
Was your prediction correct? The outcome is that the chicken crosses the road.
It looks like it is getting bigger.
In my sequence of commands, I chose to use the grow block.
The sprite grows by the value of two.
I also use the movement block.
The sprite moves downwards with a value of one.
This repeats until the end and the chicken looks like it's getting bigger as it crosses the road.
Well done.
Can you help me? I'm wondering what a prediction is.
Is it A, what you think will happen? Is it B, what has already happened? Or is it C, what you see happening? Pause the video to have a think Well done.
Did you get A, what you think will happen? Well done for having a try.
I've got a task for you.
I hope you're ready.
I'd like you to predict the outcome of this programme and write a sentence about what you think will happen.
Pause the video to try the task.
Well done for trying the task.
This is my prediction.
I predict that the rocket sprite will firstly move 10 up.
Then next turn three right.
After that I predicted it would move six right.
And finally I guessed the shrink eight block would then make the rocket look like it's moving further away.
Was your prediction the same as mine? Well, well done for having a think.
I've got another task here for you.
in ScratchJr, create this programme.
Use the same sprite, background and command blocks.
Test your programme by running it with the green flag.
Pause your video to try the task.
Well done for creating the same programme.
I'd now like you to watch the video to see the outcome of the programme.
<v Student>In this part of the task, we had to create</v> the programme and now we are going to test the programme by running it.
I'm pausing bits of this video so I can show you this code step by step.
So when I press the green flag to run the programme, the rocket is going to first of all move up six times.
The next step is that it's going to turn to the right three spaces.
Next it's going to move to the right six times.
And now the pink block is going to shrink the rocket down so that it looks like it is landing on earth.
And then the red block will end the programme.
<v ->Well done for watching that video.
</v> Did your prediction match the outcome? How was it the same or different? Share your results with a partner.
Pause the video to share your results with your partner.
This is Jacob's answer.
"I predicted that the rocket sprite would fly up and turn to the right.
I didn't realise that the shrink block would also affect the outcome and make the rocket look like it was landing on earth." Wow, well done for finishing the first section of this lesson.
You've done so well.
Now let's move on to the second section, and we're going to be learning to match outcomes.
Let's get started.
Matching outcomes.
Sometimes programmes use different blocks but produce the same outcome.
Look here, I've got two sets of different blocks.
Why will these blocks produce the same outcome? Pause your video to have a think.
Both of these programmes will move a sprite 10 spaces to the right.
On the left, I've used two move right blocks.
They both have the value of five.
And on the right I've used one move right block and that has the value of ten.
Five plus five equals 10.
What do you notice about these two programmes? Pause the video to take a look.
These two programmes use the same blocks in a different order.
They'll have the same end result.
In other words, the outcome will be the same.
Here, can you see move up? They both have the value of one.
And right here I've got the move right block.
They both have the value of one, that's the same.
Can you see here the turn block? That has the value of three.
And I've used the grow block.
They both have the value of two.
They're the same.
There's also the move down block that has the value of one.
They're both the same.
However, they're in a different order.
True or false? These programmes will produce the same outcome.
I wonder.
Pause the video and have a look at the programmes.
That's false.
Well done for having a try.
Why do you think that's false? The command blocks produce different end results, so the outcome will not be the same.
You can change the outcome of a programme.
When this programme runs, the sprite moves to the beige house.
Can you see it behind the fence? If we look at the command blocks, I have got two upwards, and then I've got eight steps to the left.
How could you change the programme to make the sprite move down to the tree? Can you see it, the one that's across the road? Pause the video to have a think.
This is Izzy, and Izzy's telling us her answer.
"I took away the move up block and used a move down block in its place." This is Sofia's answer.
"I changed the value on the move left block, then swapped the move up block for a move down block.
I then added another move left block." Even though the programmes are different, the outcome is the same.
Both Izzy and Sofia managed to make their sprite move to the tree.
However, their command blocks are different.
Both of the programmes have the same end result.
The chicken ends up at the tree.
Wonderful.
I need your help.
Why won't this programme run? When I tap on the green flag, nothing seems to happen.
What do you think? Is it A, the outcome is incorrect? Is it B, there's no start block? Is it C, the values are incorrect.
Have a little look at the command blocks and see if you can work it out.
Pause the video to have a look.
The answer was B.
There is no start block.
Can you see in the command blocks, I've forgotten to put my start block? That's why the programme won't run.
There's nothing to trigger it.
I've got a task here for you.
I'd like you to match the outcomes.
Draw lines to match the programmes that have the same outcome.
Pause the video and try the task.
Here are the answers.
Well done for having a go.
These programmes have the same outcome.
Well done.
You've gotten to the end of the lesson.
Let's quickly summarise before you go.
Summary.
Outcomes of sequences.
A sequence of commands creates an outcome.
The outcome is what happens when a programme runs.
Sometimes programmes of the same blocks in a different order can have the same end result.
Different blocks can also create the same outcome.
You can predict a program's outcome by looking at the command blocks.
A prediction is what you think will happen.
Well done.
We've gotten to the end of today's lesson.
You've done so well.