Loading...
Hello, my name is Ms. 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 to use a sequence of commands to build a programme.
Let's get started.
Welcome to today's lesson in the unit Building sequences in programmes.
This lesson is called "Programming sequences," and by the end of today's lesson, you will be able to identify the start of a sequence.
We'll be using these keywords today throughout the lesson.
The first word is sequence.
Sequence.
This means the order in which things happen.
The next word is programme.
Programme.
This means a set of ordered commands that a computer can run to complete a task.
The third word is command.
Command.
This means an instruction you use to control something.
This lesson is split into two parts.
In the first section, we'll be learning to explain sequences.
In the second section, we'll be learning to start programmes.
Let's get started with explaining sequences.
Let's explain sequences.
What is a sequence? A sequence shows the order in which things happen.
We use sequences frequently in our daily lives.
You take part in sequences at home and at school.
Can you think of any? Pause this video to have a quick think.
You might have thought of this.
When there is a fire drill at school, there is a sequence.
First, the alarm sounds.
Next, the children line up at the door.
After that, children walk calmly to the playground.
And finally, teachers take the register.
The alarm is the event that starts the sequence.
It was the first step, the alarm sounds.
The alarm is the trigger for the rest of the sequence.
Maybe you thought of this sequence, a sequence for making breakfast.
First, you get the bowl and the spoon.
Next, you get the cereal and milk.
Then, you pour the cereal into the bowl.
After that, you pour the milk into the bowl.
Then, you put the milk and the cereal away.
And finally, you use the spoon to eat the breakfast.
I wonder which event starts this sequence.
That's right.
You get the bowl and the spoon.
That's the start of the sequence.
Getting the bowl and the spoon starts the breakfast sequence.
In a race at sports day, what starts the sequence of the race? Is it A, the teacher says "go," is it B, the children race to the finish line, or is it C, everyone claps and cheers, or is it D, the winner passes the finish line first? Pause your video to have a quick think.
What starts the sequence of the race? Well done for having a try.
The teacher saying "go" starts the sequence of the race.
I wonder, what is the event that starts the sequence of the school day? Is it A, the gate opens; B, the children line up; C, the teachers come outside; or D, everyone walks to class? Pause your video to have a quick think.
That's right.
It's A, the gate opens.
That starts the sequence of the school day.
I have a task here for you.
I'd like you to write a sequence for a task that you do every day.
This could be brushing your teeth, getting dressed, or something else.
Try to make sure your sequence has four or more steps.
Number the steps of your sequence and underline the step that starts your sequence.
Pause the video so that you can finish the task.
Well done.
You're doing really, really well.
These are the steps for brushing my teeth.
First, I pick up the toothbrush.
Then, I open the toothpaste lid.
Next, I put the toothpaste on the toothbrush.
After that, I close the toothpaste lid.
Then, I brush all of my top teeth.
After that, I brush all of my bottom teeth.
Finally, at the end, I use water to rinse my mouth.
Here I've underlined the start of my sequence.
The first thing I did to start the sequence was to pick up the toothbrush.
Now I'd like you to explain your sequence to a partner.
Give them answers to these questions.
What is a sequence? Which sequence did you choose? What is the event that starts your sequence? Pause the video so that you can explain your sequence to a partner.
Well done.
You're doing really well.
Here is Jacob, and these are his answers.
He said, "A sequence is the order in which things happen." He said, "My sequence is brushing my teeth, and the event that starts this sequence is picking up the toothpaste." Well done.
You've done so well with explaining what a sequence is and also explaining how to start a sequence.
We're now going to do the second part of today's lesson, and we're going to talk about starting programmes.
Well done for getting this far.
Starting programmes.
What are the different parts of ScratchJr? Can you see here in the middle, there's a sprite and it's a chicken? Here we've got the stage.
This is where the sprite follows commands.
Here at the bottom, can you see they're the commands? These are blocks that control the sprite.
The programming area is where command blocks are placed.
Have a think, what do you call an object that can be controlled with command blocks? Is it A, a start; B, a slide; C, a sprite? Well done if you got the answer sprite.
A sprite is an object that can be controlled with command blocks.
And this sprite here is a chicken.
All programmes in ScratchJr need a block to start them.
There are different ways to start programmes in ScratchJr.
Can you see here the different ways to start the programmes? These are the event blocks.
How would you start this programme? Sofia says, "Once you've clipped the command blocks together, the programme runs automatically." Why is Sofia incorrect? Have a think and pause the video.
Why is Sofia incorrect? It's true that the command blocks need to be clipped together to work correctly.
But just like a sequence, a programme needs a trigger event to start.
It does not start automatically.
You run this programme by tapping on the green flag at the top of the screen.
The green flag is the trigger for the programme to start.
Green for go.
Just like sequences in real life, programmes also run in order.
A programme is a set of ordered commands that a computer can run to complete a task.
In ScratchJR, you read programmes from the left to the right, just like a book.
This is the sequence of commands.
You link the command blocks together like a jigsaw.
When you run the code, it runs in the order shown.
The yellow block with the green flag starts this sequence of commands.
When you tap the green flag at the top of the screen, the programme runs.
Tapping the flag is the event that starts the sequence.
Start blocks in ScratchJr are yellow.
These are used to start or run your programme.
End blocks in ScratchJr are red.
These are used to tell the programme it has reached the end.
Hmm.
Have a think.
Which block goes at the start of a programme? Is it A? Is it B? Or is it C? Pause your video to have a think.
How did you do? Did you get B? B is the block that goes at the start of a programme, and in Scratch, these are yellow.
This block's got a green flag.
Green for go.
I've got a task for you.
I'd like you to choose a background and a sprite in ScratchJr.
I then would like you to make your own programme using the start and end blocks and some movement blocks.
Well done.
I'm so pleased that you had a go at making your own programme.
I'd like you to watch the video to review how to create a programme.
<v Instructor>In this task,</v> we are going to create our own programme.
The first step is to go and choose a sprite.
So I'm going to do this by going over to the button on the left and pressing on the add button, tapping on my sprite that I want to add and using the tick.
There we go.
I'm going to just move this sprite to where I want it to be on the stage.
Next, I'm going to go up and add a background.
So this postcard button is the add background button.
I'm going to press on it to open up the menu of backgrounds, and I want to choose one that fits my design.
I'm thinking I'm going to have a dog in the bedroom because I want this dog to jump on the bed.
So next thing is starting to build out my sequence of command blocks to tell this dog what to do using programming.
So this programme is going to start with a start block.
So in the events menu here, the yellow menu, I'm going to get the green flag block, and then I'm going to go to the blue menu and think about the movements I want my dog to do.
So I first want the dog to move to the right so that it's like underneath my bed.
So I'm going to use the move right block, going to change the value and make it five.
Let's test that.
I'm going to use the green flag here to test my programme.
You'll see me do this a lot.
It's good to test your programme all the way through when you are programming.
So if I press the run, there we go.
I'm going to press this blue button now called reset, and that will move my sprite back to its original position, which is really helpful when you are busy testing.
So I am going to reset the sprite's position now.
Now let's add some more movement blocks.
I'm going to do move up five.
That will get the dog on the bed.
And then let's have the dog do some jumping.
So let's see.
I'm going to keep that value at two and then do a bigger jump with the next jump.
Let's test that and see.
I'm going to hope that the dog gets up on the bed and does a small jump and then a bigger jump.
Let's run that programme.
That looks really good.
I'm going to reset this here with the blue button.
My program's nearly at an end now, so I'm just thinking about one more thing to add to my dog programme here.
Reset and then I'm going to keep that small.
So I'm going to have a small jump, a big jump, and then a small jump.
And my programme here is finishing with a red end block.
There, that looks great.
Let's see this programme in full screen.
I'm going to press the full screen button and then that way we can get an idea of the full picture.
Let's press the green flag and run the programme.
<v ->Well done for watching that video all the way through.
</v> I've got another task for you.
I hope you're ready.
I'd like you to test that your programme works correctly.
Use the green flag to start the sequence.
Now tell a partner about your programme.
Explain how your sequence starts.
Pause the video to test your programme and to speak to a partner about how your sequence starts.
Here is Sam, and this is Sam's programme.
Sam says, "My programme is about a dog jumping on the bed.
It starts with the green flag block." Fantastic.
You've done so well in today's lesson Programming sequences.
Let's summarise.
A sequence is the order in which things happen.
A command is an instruction you use to control something.
In ScratchJr, you use a sequence of command blocks to build a programme.
A programme is a set of ordered commands that a computer can run to complete a task.
Sequences start with an event.
Programmes start with a start block.
And that brings us to the end of today's lesson.
Well done.