Loading...
Hello, everybody.
Welcome to computing.
It's really great to see you here today.
My name is Mrs. Franzsen, and thank you for choosing my lesson.
We've got so much to learn today.
We are going to be learning all about programming.
I hope you are as excited about that as I am.
I love programming.
Let's go and get started.
By the end of the lesson today, you will be able to change the value of a command block and explain its effect.
Let's go through our keywords for today.
So we are going to do my turn, your turn.
So that means that I'm going to say the keyword.
Then I want you to say the keyword nice and loud so I can hear it.
And then I want you to listen carefully while I explain what that keyword means.
Okay? Are you ready? We're gonna start on the first word, now.
My turn.
Delete.
Your turn.
That's great.
Delete is a real computery word, isn't it? So delete means to remove something on a screen.
Next word.
My turn.
Value.
Your turn.
That's great.
A value is a number that can be changed.
Next word.
My turn.
Effect Your turn.
Great.
And effect is the result of something changing.
Okay, we're moving on to the first part of the lesson now.
It's all about finding value.
Are you ready? Now let's go.
A programme is a set of ordered commands that can be run by a computer to complete a task.
You can create a programme in ScratchJr using command blocks.
And we've got a programme here in front of us starting with the yellow start block with the green flag on it.
And then we've got three move right blocks, and then we've got the red ending block.
Sometimes programmes can be long.
Long programmes can be tricky to work with.
Some programmes are so long, they don't even fit on one page.
Look at this programme that Tic has at the bottom of the screen.
Do you see how many blue blocks are in there? There are loads of them.
If I was trying to use this programme, I might get frustrated because, as I move around on the screen, I might accidentally separate the programme, 'cause it's so long, or I might move some blocks behind other blocks.
So long programmes can be tricky to work with.
Sometimes you need to remove a command block from your programme.
To delete a block, oh, did you hear that keyword there? What was it? Delete.
Well done.
To delete a block, drag it back to the blocks palette.
Anything attached to that block will move with it.
So drag the blocks apart to separate them.
So as you can see here, over on the side, I've got my green flag, and then two movement blocks, and if I moved it from the middle, all of those blocks would come with me.
I need to make sure I separated the blocks before I drag them back to the blocks palette if I want to delete something.
Let's have a look at how we delete blocks.
So I'm going to separate them out and drag the blocks.
So I'm pulling them towards the blocks palette.
I'm tapping and dragging, and then I'm pulling them into the palette, if I want to delete that.
Let's do a little check here to see if you are following me.
One way to make your programme shorter is to A, change the colour of blocks, B, make blocks smaller, or C, delete blocks.
Pause the video and have a think about what your answer is.
Well done for thinking about that question.
One way to make your programme shorter is to C, delete blocks.
So when we delete, we are moving blocks out of the programme and we're removing them from the programme.
A value, there was a key word there, I'm gonna say it again.
A value is a number that can be changed.
Some command blocks have a value underneath.
You see my blue block here, it has got a value underneath.
Hold up a finger and show me what value it has.
That's right.
The value on this block is a one.
Some command blocks do not have a value underneath.
Do you see the start block? My yellow start block has got a green flag, but there is no value under it.
Values can help you solve the problem of having these very long programmes.
Can you see my programme? It has got so many movement blocks.
It has got so many values as well.
Let's count how many values this programme has.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10 values.
Oh no, that's too long.
In ScratchJr, the value is the, A, colour of a block, B, number under a block, or C, name of a block.
Pause the video while you think of the answer.
Well done for working on this question.
In ScratchJr, the value is the, B, number under a block.
Well done, Right, we're getting ready for our first task now.
I love this task.
It's one of my favourites, because we are going to get to be detectives today.
Can you see my magnifying glass? So we are going to be, first of all, searching through the app.
So you're going to be hunting through the ScratchJr app to find all of the command blocks that have got values underneath them.
So next to my magnifying glass, I've got an outline of a block there, and it's got the value underneath of one.
And I want you to go and see if you can find all the command blocks that have a value as well.
Then, I have given you a worksheet, and on the worksheet I want you to draw the symbols of the blocks that you find that have got values, and I want you to colour them with the correct colour.
So it's kind of like a scavenger hunt.
My third point on this task says, "Did you find any command blocks with values underneath that were a different shape?" I want you to talk about what you found with a partner.
So once you've completed your worksheet, you found your values, you wrote down the symbols, and you coloured it in, I want you to find someone to talk about what you found with.
It's time to pause the video now, you can go and work on this task, and I'll be here when you get back.
Welcome back.
Well done for working so hard on that task.
I just know that you must have had lots of fun searching through the app and trying to spot, like a detective, all of those values.
Here are some of the values that I found.
I coloured in the blocks and then I drew in the different symbols that I saw on the blocks.
You can see there are a lot of blue blocks that have got values, and I also noticed an orange block with a value, and I noticed some pink blocks with values as well.
So well done if you spotted those.
When you shared with a partner about what you found, these are some of the things that you might have said.
So Izzy said, "I found a long orange block with a value under it.
The block was a repeat block." Thank you, Izzy, for that.
Maybe Izzy found out that when you tap on a block that's in the blocks palette, it puts the name of the block in, like, a popup.
That could be really helpful to try and figure out what the blocks do.
Jacob said, "I saw a purple block with a word under it instead of a number value.
The word was hi!" So Joseph found out that sometimes there could be a value that's not a number, and he found a value that was a word instead.
Hmm.
Thank you, Jacob.
In the next part of this lesson, we are going to some more work on changing values.
Are you ready? Let's go.
Sometimes you use the same command block lots of times when you write a programme.
So let's count how many times I use the move right here.
1, 2, 3, 4, 5 move right blocks in a row.
Do you notice that? We've got the start block, we've got five move right blocks, like we counted, and then we've got the end block.
Instead of using all these blocks, you could use one block And change the value.
Hmm.
Letting you have a moment to think about that.
I'm gonna say it again.
Instead of using all these blocks, you can use one block and change the value.
So down at the bottom on this new block, do you notice the value is different? What value's at the bottom? Show me with your hands.
Yeah, we've got a new value, haven't we? We've got a value of 5.
When you tap on the value of a block, a keypad appears.
To change the value, you tap the number on the keypad.
Let's see how you change the value.
So I'm gonna tap on the value of 1.
The keypad pops up.
I'm gonna tap on the new value, 5, and it goes under the block, just like that.
Values can have different effects.
Oh, did you hear a new keyword there? What was it? Effects.
Well done if you spotted that.
This command block will make a sprite move to the right five times.
Oh, a new block here.
What's this one? What do you think the hop block will do with this value? I'm gonna read that question again.
What do you think the hop block will do with this value? Pause the video and have a think about that.
Well done for thinking about what that hop block might do.
Let's learn a bit more about that.
To find out what effect a value has, the best thing to do is to test it.
So I mean we should run the programme to see what effect the value has.
True or false? The value is always how many times the command should run.
Pause the video and have a think about that.
The answer was false.
Why? Different Values cause different effects.
That was a tricky one.
Well done if you got that right.
This is the reset character button.
It moves any sprites back to their starting positions.
This is helpful when you test your programme.
Let's see how you test the values in a programme.
In this clip, I'm going to show you how I tested out some values.
I'm going to use the green start block.
I'm going to add a move right block, and a hop block to my programme, and finish it off with a end block.
Now, I'm going to run this programme to see what effect it has, and then I'm gonna press the reset characters button to put Tic back to the start.
Now I'm gonna change the values of my blue movement blocks by tapping on the value, changing it to a different number, tapping on the hop value, and changing it.
Now I'm gonna run the programme again to see how the programme looks this time and see if I can notice any differences.
I noticed that Tic moved further and they hopped higher as well.
True or false? A value is a number under a command block that cannot be changed.
Pause the video and have a think about your answer.
The answer was false.
Why? A value can be changed by tapping it and using the keypad to enter a number.
Well done if you got that answer correct.
Right, we're gonna work on a task now.
I would like you to create this programme in ScratchJr.
So I want you to make sure you follow the blocks I'm using, so make sure you start with the green flag, then I want you to use these movement blocks and end with a red end block as well.
So I want you to create and then I want you to run this programme in ScratchJr.
And then the fun bit, I want you to change your programme to make it shorter.
So your programme must still do the same thing, but I want you to change the values and delete some blocks to make your programme shorter.
This is a really good challenge for you, so I hope you enjoy it.
It's time to pause the video now.
Off you go and work on this challenge, and I'll be here when you get back.
Welcome back.
It was really great to see your effort and hard work on that challenge.
We shortened our programme in ScratchJr by changing the values and deleting some blocks.
So your programme might now look like this.
You might have a move right with a value of three, and a move up with a value of two, and a move down with a value of one in your programme.
I wonder if your programme looks the same as mine or if it looks different.
Let's watch a video about this task.
In this project, I am going to be running a programme.
So my first step is to create that programme.
I'm going to find the start block, the green flag, and I'm going to go to the motion blocks and find the blue arrows that I need for this programme.
So I'm doing three move right blocks, taking my time, then two move ups, then one move down, and then the programme ends with a red end block.
Okay, I'm gonna run this programme.
I'm just counting the blocks first to check I've got all the right blocks in place.
Let's run it.
Okay, let's reset Tic.
I think it would be easier to see the result if I added a background.
So I'm going to add a background here, and then I'm gonna run my programme again to see where Tic ends up.
Okay, over by the trees there.
So my next part of the task is to change the programme to make it shorter.
So it needs to work in the same way, so I'm gonna look at changing some values here.
I've got three move right blocks.
Is there a way I can make this programme shorter here by changing a value? I'm gonna change the value of the bottom block here to be a 3.
And then this move right 3 will work the same as those three blocks that I just deleted.
So that makes my programme a lot shorter.
Let's look at the next part of my programme.
I've got two move up blocks.
How could I make the programme shorter here? I'm gonna change the value of this block to be a 2, and then I don't need these two move up blocks.
And the last part of this programme is a single move down.
Do I need to change that? No, it's already short enough.
It's only a 1 value.
So now I've shortened this programme.
I'm gonna run this programme to see how it looks.
Great.
Tic ends up exactly in the same place as before.
So I've completed this task.
You have worked so hard today.
Look at all the learning we've done together.
It's time to summarise that learning.
Here we go.
Long programmes can be tricky to work with.
You can shorten programmes by deleting blocks and changing values.
To delete blocks, drag them back to the blocks palette.
Some command blocks have values under them.
Values can be changed, causing different effects.
Thank you for coming to learn with me today.
I really enjoyed it, and I hope you come back soon for another lesson.