Loading...
Hello, my name is Ms. Powell and welcome to Computing.
I'm so pleased that you decided to join me here today.
In today's lesson, we're going to be evaluating a quiz.
Let's get started.
Welcome to today's lesson from the unit Using Selection and Programming to Develop a Quiz.
Today's lesson is called Evaluating a Quiz, and by the end of today's lesson, you'll be able to improve and evaluate your programme.
We'll be using these keywords throughout today's lesson.
Let's take a look at them.
The first word is evaluate.
Evaluate.
This means to reflect on what has gone well and what you could improve in a project.
The next word is setup code.
Setup code.
This is a group of commands that reset things back to how they should be at the start of the programme.
Lesson outline, Evaluating a quiz.
Today's lesson is split into two sections.
In the first section, we'll identify improvements to a quiz programme, and in the second section, we use setup code in a programme.
Let's get started with the first section.
Identify improvements to a quiz programme.
Once a coding project is built, it's important to reflect on what has gone well and what you could improve.
This is called evaluating.
With a Scratch project, it's important to test your finished programme to check that it is easy to understand.
Otherwise, another user might not know how to play or use your programme.
Three different users are testing Sam's quiz, Andeep, Aisha, and Jacob.
They all knew the correct answers, but only one of them got all of the answers right.
Sam is using their inputs to evaluate and improve the quiz.
Match each word or phrase to its definition.
On the left, we've got condition, input, and selection, and the definitions are what the user types into a programme; part of a programme where if a condition is met, a set of commands is run; a statement that can be either true or false.
Pause the video and see if you can match each word or phrase to its definition.
Well done for having a go.
Let's match them together.
Condition.
This is a statement that can be either true or false.
Input.
What the user types into a programme.
Selection.
Part of a programme where a condition is met, a set of commands is run.
This is what the users input as their answers.
Aisha says, "I put the answer yes, no and yes.
I got three questions, right." Andeep says, "I put the answers yep, no and yes.
I've got two questions right." And Jacob says, "I put the answers correct, wrong and correct.
I got every question wrong." Why do you think this happened? Pause the video and have a quick think.
Why do you think some of the players got the questions wrong even though they knew the correct answer? The programme only accepts one exact answer.
Aisha's answers match the conditions in Sam's code exactly.
Let's take a little look at Sam's code.
When green flag clicked, say Welcome to my quiz for two seconds.
Ask, is Madrid the capital of Belgium, and wait.
If answer equals yes, then change colour effect by 50, or else say Wrong for two seconds.
Our condition is, is the answer yes? True or false? The programme is only accepting the answer yes, Y-E-S.
For Question 1, Aisha says, "I put the answer yes." This matches our condition exactly.
So this means that Aisha will get the outcome for correct.
Change colour effect by 50.
Even though Andeep and Jacob knew the correct answer, they did not input the answer that the condition was checking for.
Andeep type yep, Y-E-P as his answer, and Jacob put correct as his answer.
Yep/incorrect do not match the condition, which is Y-E-S, yes.
This would probably be quite frustrating for Andeep and Jacob because even though they knew the answer to the question, they got the outcome for false, and that's because the spelling didn't match the condition.
Andeep says, "I typed yep as my answer," and Jacob says, "I put correct as my answer." Are these code sequences using the same selection? Take a little look at the code sequences, try to work out if they're using the same selection.
Pause the video to have a try.
Let's read through the code sequences.
On the left, when green flag clicked, say Welcome to my quiz for two seconds.
Ask, is Madrid the capital of Belgium, and wait.
If answer equals yes, then change colour effect by 50, or else say Wrong for two seconds.
Let's look at the code sequence on the right.
When green flag clicked, say Welcome to my quiz for two seconds.
Ask, is Madrid the capital of Belgium, and wait.
If answer equals no, then change colour effect by 50, or else, say Wrong for two seconds.
Did you spot anything that was the same or different here in this code? They are both using the same selection.
The if-then-else block has been used.
We've got change colour effect by 50, or else, say Wrong for two seconds.
Are the conditions the same or different? Pause the video and have a quick look.
The conditions are different.
Here on the left, we've got if answer equals yes.
So the condition is yes, true or false.
And on the right, we've got if answer equals no.
So the condition is no, true or false.
The code on the left is expecting the user to input yes as the correct answer, whereas the code on the right is expecting the user to input no as the correct answer.
One programme uses yes as the condition, the other uses no as the condition.
As a programmer, you can improve your programme to help the user input their correct answer in the right way.
How could you show the user how to correctly answer questions in your quiz? Pause the video and have a quick think.
identify improvements to a quiz programme.
Evaluate your code and change any parts that might confuse your user.
Andeep says, "I'll go through my code and look for any confusing questions." And Sam says, "I've checked that I've explained how I want The answer typed in." Your question should be easy to understand.
There are different ways to add this information for the user.
On way is that you could use a say block to add a message before the quiz starts, like Type true or false to answer the questions.
Let's see what this would look like here in Scratch.
When this sprite clicked, say Welcome to our solar system quiz.
Say type true or false to answer the questions.
Ask true or false? Jupiter is the largest planet, and wait.
The say block, Type true or false to answer the questions, gives the user really clear instructions on how to complete the quiz.
Let's imagine that you are doing a mathematics quiz.
You might want your say block to tell the user to answer in numbers, numerals, rather than words.
Another way is using the instruction box in Scratch.
Press on the See Project Page button, then write your instructions in the box.
This kind of improvement can help user without changing your question-and-answer code.
Instructions.
When you type your answers, remember to type only in lowercase.
You can type yes, no, true, or false.
Aisha says, "Do capital letters matter in Scratch when checking conditions?" Sam says, "Not in Scratch, but it's best to use the same lower and uppercase every time." In other programming languages, you do need to pay attention to whether you are using upper or lowercase.
Open an existing question-and-answer quiz you have made.
If you don't have one, you can use this project instead, on oak.
link/solar-system-2, Pause the video to open up your quiz.
Well done, I've got a task here for you.
I'd like you to give it a go.
Run the programme, then evaluate it.
Number one, explain what problems a user might experience when answering the questions in your interactive quiz.
Number two, what could you add to your programme to help the user answer the questions? And number three, make your planned improvements to your programme.
Pause the video to finish your task.
fantastic, you've done really well.
I'd like to give you some feedback.
Number one, explain what problems a user might experience when answering the questions in your interactive quiz.
The user might know the right answer but spell it differently.
Or they might use a word that means the same thing, but the quiz will still mark it as wrong.
What could you add to your programme to help the user answer the questions? I could add a say block that tells the user to type the answer exactly how the condition will be checking it.
For example, yes or true.
Number three, open oak.
link/solar-system-3.
Well done, fantastic.
You've done really well on the first part of today's lesson, Identify improvements to a quiz programme.
Let's move on to the second section.
Use setup code in a programme.
When different users play your quiz, the experience should be the same every time.
Just like resetting a board game before playing, a programme needs to start the same way for everyone.
What might change in a quiz? Aisha says, "A sprite's position and the direction it is facing could change." Andeep says, "The sprite might be a different colour or size." Jacob says, "The background could change." To reset these parts of your programme, you can use setup code.
Setup code is a group of commands that put things back to how they should be at the start of the programme.
That way, the next user will get the full experience of enjoying your quiz.
True or false? Once you make a Scratch quiz, it always will work the same every time.
Pause the video and have a quick think.
Is that true or false? The answer is false, and why is that? Without setup code, your quiz might behave differently for each user depending on what happened the last time it was run.
To reset your programme, you might use these blocks as part of your setup code.
Go to x zero, y zero.
This moves the sprite to the middle of the screen.
Point in direction 90.
This makes the sprite face right, its starting direction.
Switch costume to costume1.
This changes the sprite's costume.
To reset your programme, you might use these blocks as part of your setup code.
Set size to 100%.
This resets the sprite back to its normal size.
Set colour effect to zero.
This clears any colour changes and returns the sprite to its original colour.
Switch backdrop to starting backdrop.
This changes the backdrop.
Think about how you want your setup code to be triggered.
Setup code is often triggered by using the green flag block.
Let's take a little look at this code here in Scratch.
When green flag clicked, go to x zero, y zero, point in direction 90.
Set size to 100%.
Set colour effect to zero.
So this means if a player would like the sprite to go back to its original position, all they need to do is click on the green flag.
Which command will reset a sprite's position? Have a little look here at the commands.
We've got A, set size to 100%.
B, go to x zero, y zero, and C, point in direction 90.
Have a little think which one will reset the sprite's position.
Pause the video to have a go.
Fantastic.
Well done for having a try.
Command B will reset a sprite's position.
Go to x zero, y zero.
The sprite will go back to the centre of the screen.
Create your setup code.
Jacob says, "Test your own programme to decide what setup code you will need." Sam says, "My sprite doesn't change position, so I won't use the go to x y block, but I do need the switch backdrop to block." You've done really well.
I've got a task here for you.
I'd like you to add setup code to your programme.
When you finish, test your programme three times.
Does it always start in the same way? Once it is completed, share your project with someone else and let them play your quiz.
I'd like to give you some feedback.
Open the Solar System Final project on oak.
link/solar-system-final and have a look at the setup code that I've used here.
<v Instructor>We are evaluating this Scratch project.
</v> So this is a quiz programme.
This is the solar system quiz and evaluating is checking how well a programme works for all users.
In a programme, it's important to make sure your users know how to input, put the correct answer.
So we need to make sure this programme is giving the user instructions on how to play and we need to make sure that all of our code is working.
Now, we've got one single sprite in this project.
We've got two code sequences we're gonna be looking at today.
I want to zoom in and show you the smaller code sequence.
This is the setup code.
Now, setup code is really important.
It is a group of commands that put things back to how they should be at the start of your programme.
That way, the next user will get the full experience of enjoying your quiz.
So you can see here that when I press the green flag in my project, this code will run.
Now, this is going to be resetting a number of things.
We've got a backdrop being reset, costume, any colour effects, any positioning.
So these are go to coordinates and this will place the sprite right back to where it is right now.
And we've got a point in direction as well which will set the angle that the sprite is facing and we've got a size one too.
So all of these will run when I press the green flag.
You won't see anything happening now, because the sprite is already at the starting position.
So the best way to test that reset code is to actually look at the quiz code and run through it and check that it is also working.
Okay, looking at this quiz code, when I press the sprite, this code will run and you can see it's running because of the yellow outline around the code blocks here.
So the best way to do a proper test of your code is to look through and test as many elements as possible.
So this will mean doing this more than once, running through your answers and doing the correct or the incorrect answer each time to make sure that you've seen every effect and check that everything that you put in your programme is working the way you wanted.
So for this first question, true or false, Jupiter is the largest planet.
I want to do a false answer, so that I can check this colour effect is working.
So I'm going to say false.
We can see there that the colour has changed, so that colour effect is working and that also means later, when I go to my reset code, I can check that this set colour to zero will work too.
Let's go down and look at the next question.
This time, we've got a sound effect and in fact, we've got two sound effects here.
For the true answer and the false answer, there will be two different sound effects.
So let's test them out.
I'm going to try and get the first one to trigger, which I will need to press false on.
Let's see if this works.
(whirring) And there we go.
We know that the space fly-by sound is working.
Let's see what we can trigger next.
So for this question, is Mercury the hottest planet in the solar system? We've got a rotation, if it is correct, and a glide if it's incorrect.
Let's go with the glide.
So I'm going to do a no here to see if I can trigger the glide.
That's great, working correctly.
And then the last one, we have got a backdrop switch.
So whether you get it true or false, the backdrop should switch out.
There we go.
And the quiz is all finished.
You can see that code has stopped running now.
Let's come back up here to the reset code.
So this reset code is going to affect a number of things and I'm going to press the green flag here and check that everything resets correctly.
There we go.
You might notice that the Earth is back to the original colour and the backdrop has changed.
So you will need to go through your quiz a few more times, testing to see that every part of your reset code is working correctly.
You need to make sure that your programme always starts in the same way.
So test your programme three times and then once it's all done, you can share your project with someone else and let them play your quiz too.
<v ->Oh, you've done so well</v> in today's lesson, Evaluating a quiz.
Let's summarise.
Evaluating is checking how well a programme works for all users.
In a programme, it's important to make sure users know how to input the correct answer.
This can be done by giving clear instructions or by showing an example before the question.
Setup code is used to reset the programme to its starting state.
This is so that every user has the same experience each time the quiz is run.
Well done, you've done so well in today's lesson and you completed the unit.
Fantastic.