Loading...
Hello, welcome back to selection in quizzes.
My name's Josh, your computing teacher, and in this lesson, we are going to be implementing our algorithm in Scratch, testing our quiz, and making sure it works the way you want it to do, and also making any changes that we need to make in order for it to work successfully.
You are going to need access to a web browser and the Scratch website.
If you are under the age of 13 and would like an account, remember, you will need your parent, carer, or teacher to support you in creating one.
You don't need an account.
So remember, you can create things in Scratch without one, but do you make sure you are downloading your project after each task or after the lesson.
This is really important for this lesson because you will need it for less than six.
So remember, do download anything you create after each task or after the lesson.
You're going to need something to write on and with so make sure you have that.
You will also need your algorithm from the previous lesson and your planning sheet.
If you have all of those things ready and you're ready to get started, let's make a move.
In this lesson then, you will create a programme which uses selection.
We've already created our algorithm, so you will implement your algorithm to create the first part of your programme.
You will test your programme, and you will be able to at the end explain that the benefits of sharing your programme.
Before we do any of that, we're just going to go through a few things first and we're going to look at both, one or none.
So over the following slides, there's going to be a couple of programmes, programme A and programme B.
For each statement that's given, I'd like you to identify if it relates to both of the programmes, one of the programmes, or none of the programmes.
So the first one then, first statement contains selection using the if, then else structure.
Pause the video, is it both of the programmes, one of the programmes, or none of the programmes? Let's see then, it is both of the programmes.
They both contain that if then else block, which is our selection block.
Next one then, both of the programmes, one of the programmes, or none of the programmes contain no as part of the condition.
Pause the video, have a look.
Okay, so it was one of the programmes.
You can see that in the condition, only one of the programmes contains no as part of the condition.
The next one by one or none, the Sprite will move if the condition is false.
Pause the video.
Okay, so that one of the programmes, that was programme B and you can see that in this move 10 steps part of the programme.
Next one, programme A B both one or none.
The Sprite will change colour if the condition is true.
Pause the video, see if you can identify if it's both one or none.
Welcome back.
Hopefully, you've noticed then that it is one of the programmes that, is programme A, and you can see that change colour effect by 50 in that part of the selection.
Last one then, both one or none.
Contains an infinite loop so the condition is repeatedly checked.
Pause the video, identify if it's both one or none.
Okay, welcome back.
Hopefully, you've noticed then that it is none of the programmes, okay? They both have that ask question and wait block.
Using that white block means that we don't need to add an infinite loop in order to repeat to be check the condition because the programme is waiting for an answer to the question.
Well, I don't know if you've spotted all of those.
If you didn't and you'd like to go back, just rewind the video and just check through again and see how you get all.
In the previous lesson then, you were given a task, and in order to create your algorithm, you have to relate that back to the task each time.
So what I'd like you to do is just have a quick think, what was the task you were given the lesson four? Hopefully, you remembered them that the task you were given was to create an interactive quiz using selection.
And you created that using an algorithm to start with.
Just using your algorithm, I'd like you to identify on your design, your question, the correct answers, and when a selection is used to control outcomes.
Pause the video, identify those three things on your algorithms and resume the video when you're done.
So hopefully, you have spotted those three things on your design, let's move on to implementing our design.
So the first thing we're going to look at before we get started is the blocks that we might need to implement the first part of your algorithm.
So look at the blocks on the screen, pause the video, and identify which ones you would need for the first part.
So that's your first question, your first condition, and your first false and true outcomes.
Pause media and have a go.
Welcome back.
Hopefully, you've spotted which of those blocks you will need.
You might need different blocks as well, but you will need at least a few of those blocks in order to create the first part of your programme.
And that's your first task.
Your first task is to open up the Scratch website.
If you have an account, remember to log into your account first, if you don't have an account remember that at the end, you will need to download it and we'll just keep your project at the end of the lesson because you will need it for less than six.
So pause the video, implement the first part, question, answer, and your selected outcomes for true and false and resume the video when you've done all of that.
Welcome back.
Hopefully, now you have the first part of your algorithm implemented within Scratch and you are able to see that you've got your question, your condition is there, and your two selected outcomes, the true and false.
Hopefully, you've got all of that ready.
Let's have a quick look of what mine looks like.
So I have on the screen all of the different pieces of my project just to show you what your implementation should look like after you've completed the first part of your programme.
So I added a nice starter welcome block, just to give people a bit more of a nicer introduction to my quiz.
We're not jumping straight into the questions.
I have my ask block here, which is what is the capital city of Spain, and then the white block.
I have my selection, my condition where the answer given by the user needs to equal Madrid.
If it does my Scratch Sprite will say, that's correct.
It'll glide one second.
Now I didn't get coordinates for it to glide two.
I've just had a random position on the screen.
And I also added a change colour effect by 25.
I thought that would be quite a nice thing to do straight off the bat if you get the question right.
Finally, it'll solve the question.
The user gives the wrong answer, then it will say, unlucky, it's Madrid for two seconds and then change size by minus 10.
So this is the first part of my programme.
Hopefully, you have something that looks similar to this.
Let's have a look at what we're doing next.
That was the first part of my programme.
Then I've implemented the first part first section of my programme, my capital city's quiz.
Now, what we need to think about is testing selection.
So I've pulled all those blocks together, but how do I know if my programme has been implemented correctly? I need to run that programme, enter the correct and incorrect answer and compare the outcomes selected with those that I identified in my algorithm.
So my next step then is to test my programme to ensure that it runs the way I expected it to.
So you're going to do that now.
I'd like you to pause the video, open up your project, and complete the task of testing your programme using the questions on your worksheet.
Resume the video when you've done that.
Welcome back.
Hopefully, then you have noticed whether your first part of your algorithm, the first part of your programme is running the way you expected it to.
And the outcomes are the same as though you identified in your algorithm.
We're going to have a look at a different algorithm now very briefly, it's going to show us what our next steps will be.
So this is all testing selection algorithm.
So the selected outcomes are the same as in your algorithm.
If the answer is yes, follow the true route.
If the answer is no, follow the false routes.
So this is where we are going to split the task, okay? Because if the answer to this question is no, the selecting outcomes are not the same in your algorithm and you aren't sure why, then what you need to do is you need to go back and debug your programme.
And you can do that by using the prompts in section two of task two.
If you're programme run this the way you would like it to run, either A, follows the algorithm that you created in the lesson four, or it follows roughly the same algorithm you've added a few bits in, but you know about that, then we can move on to task three.
So task three is implementing the rest of your design in Scratch.
So what I would like you to do is open up your project, implement the rest of your design in Scratch, using your algorithms, your questions, your conditions, your outcomes, using that selection, all of the things that we've talked about in the previous lessons, stop building the rest of your programme in Scratch.
And it's really important that you are testing as you do that.
So test it as you go.
Does it follow the route that you expected to follow? And this can be easier done if you want splitting it first and running through each section individually.
So implement your design in Scratch.
The rest of your project needs to be completed, test as you go.
Resume the video when you've done that.
Okay, welcome back.
Hopefully, then you now have a tested programme.
Let's have a look at what mine looks like.
I have implemented my outward man as a programme and you can see that if I scroll down all the different sections here.
Now the reason I've kept them as sections and not all together at this point is because I wanted to try them all out individually.
It's much easier to do that if you're not having to go through the whole thing again to check the next one works.
So for example, if I pull this one out as well, I like click on this block, this section, you can see that they go straight to the question, what is the capital of Spain? And this is a good way to check that what happens is what you expect to happen.
So if I type in Madrid, which is spelled wrong, you can see that it said, unlucky, it's Madrid and then change size by minus 10.
And if we try that again and we spell Madrid correctly, it says that's correct and it moves my Sprite to random position on the screen and changes the colour effect, which is what I wanted to happen.
So then you've seen what happens if the answer is correct and we also inadvertently saw what happens if the answer is incorrect.
I can do that on all of them, I can try all of them.
So what is the capital of Iceland? So if I am right, Reykjavik, it says, well done.
Now what I've noticed there is that it is turning 360 degrees, but it doesn't show that 'cause it's one whole turn.
So what I've noticed then is that if I debug that and say I want to go 180 degrees, then it will turn my Sprite a different way.
So let's try that again.
Well done and it turned my Sprite 180 degrees.
Good.
Okay, the next one I would like to do is I would like to say, "Good try is Reykjavik, I'd like to do this false part of my programme.
So I'm going to say the answer to my question is Paris.
It says, good try, it's Reykjavik.
And it changes to the next costume that changed very quickly but it did change to the next costume.
Next one, what is the capital of France.
I got to say Paris because the correct answer.
It says excellent and he moves 25 steps.
I do that again and I say, Spain is the capital of France.
It says, unlucky, it's Paris and it changes the colour effect by 25 again.
And the final one, ask what is the capital of Italy? I say Rome.
It says brilliant and plays a meowing sound.
If I get this wrong, it's incorrect.
It's Rome and it turns 15 degrees.
So now I can go through and test it all and I've got this last little bit here, which just says, "Thank you for playing my quiz," and say, "I hope you enjoyed it for two seconds each." What I have noticed though, by testing it is that I would like there to be an exclamation mark there and I would also like to change this part here, this glide one second to a random position.
Because as you've seen, if you glide to a random position, it could be covered up by this bar here, which allows the user to input their answer.
So what I'm going to do is I'm just going to remove that part there.
I just delete that block and I'm going to use a glide a position.
I'm going to say it 80 by 65.
So let just to quickly check that that goes where I wanted to go.
Excellent.
And that has moved my Sprite across the screen to that position there.
So I've made those changes.
I can not place my programme back together And before we look at the last step of our programme, I just want to remind you that you will need this for lesson six.
So if you don't have a Scratch account and it's not saved anywhere, make sure you are downloading it to your computer.
And you can do that by selecting File and selecting Save To Your Computer.
When it comes to lesson six, if you've saved it to a computer, just remember what you've saved the name as and you will be able to load that from your computer when you open up Scratch and we'll further enhance our projects.
Let's have a look at what our next step is today.
So now you have a full programme.
Hopefully, it looked similar to mine and that is all of your algorithm and some extra questions included in your programme.
You now have a quiz.
The final thing we need to do, and this is the final task of the lesson, is one final test.
Put back all of your blocks together if you haven't already, run through it all together, and you're going to test first using all incorrect answers, this make sure that your programme works the way you intended it to if everyone gets all of the answers wrong, and run through it with all of the correct answers as well to test that it works that way.
Pause the video, go into your final test, and resume the video when you're done.
Welcome back.
Hopefully then, you've done your final test.
Everything went the way you wanted it to.
If it didn't, make sure you've gone back and debug that, made some changes so that it does work as you expected.
We're going to move on to the last couple of things before we finish off today.
The first thing I want us to think about sharing our programmes.
Pause the video, have a quick brief think about who the intended audience is for your programme.
Okay, hopefully then, you've noticed that the intended audience for your programme isn't yourself, it's other users to test their knowledge.
Now, whatever age range that is, whoever is in your school or higher or whatever is up to you, but it is for other people, okay? You already know the answers.
So it wouldn't be helpful for you to complete the quiz over and over and over again.
So if our intended audience is other users, I want you to think about what the benefits of sharing your programme with those others is.
So pause the video and think about what the benefits are of sharing your programme with others.
Welcome back.
Hopefully, you thought of some things then that could be a benefit for sharing your programme with others.
Let's just go over a few of those together.
So one of them is that it provides feedback from other users on your programme.
This allows you to forever improve your programme if people find things that they think is wrong or that needs to be changed or that impacts the users as they run it through the programme.
It provides that feedback for you.
It also shows that it works as it's intending to work.
So if you don't get the feedback, that says it needs to be changed or anything like that, but people are still using it, it means that it works the way you wanted it to work.
So those are some of the benefits of sharing your programme with others, and particularly going back to the fact that the audience of this programme is other users and not just yourself.
That concludes lesson five of the selection in quizzes unit.
Have you enjoyed creating your programmes, creating that all from the algorithm that you created in lesson four, and do you have a programme that works and that you like and want to share with others.
If you haven't already, please make sure you download your programmes.
You will need them for lesson six.
So if you haven't gone account, download your programme now so that you've got it ready for lesson six.
Please consider sharing them with us here at Oak National Academy as well.
If you'd like to do that, I'll ask you a parent or carer to share them on Instagram, Facebook, or Twitter, tag @OakNational and #LearnwithOak.
I've really, really enjoyed this lesson.
I really enjoy creating things in Scratch.
I hope you have too and I'm really looking forward to lesson six, where we will evaluate our quiz and make further improvements.
I'll see you then.