Lesson video

In progress...


Welcome to lesson five of our mobile app development unit.

I'm Ben and in this lesson, you're going to continue working on the app that you started last lesson, and hopefully make it a little bit more complete.

So all you'll need for this lesson is your computer and a web browser.

You'll also need access to your project, which is on code.


So you need to log into your account and if you're under 13, please ask your parents or carer to login to the account for you, okay.

So if you can clear away any distractions that you might have, so turn your mobile phone off, although you might want to use it later on to preview your app.

And if you can find a nice quiet place to work, that would also be fantastic, okay.

So when you've done all of that and you're ready, let's get started.

Okay, so in this lesson, we're going to add some user input into our block-based programming language, squish this course, App Lab, to include sequencing and selection.

Now last lesson, we looked at user input.

So this time we're looking at more, the new thing here is selection, okay.

You're going to work through your decomposed steps that you broke down to make the app from the challenge more manageable.

So you going to continue working through your decomposed steps and also hopefully you're going to include some variables in your project as well.

So let's have a look at that new section that's been added in here, which is selection.

Now you might be familiar with selection from other programming units that you might have tackled in the past.

Okay? So hopefully some of this, even though you might, well, even though you might not have used selection inside App Lab, hopefully you've used it before somewhere.

Whether or not that be in Scratch, or if you've done a Python Programming unit, for example.

So this, the block's attack team and the wording might not be too unfamiliar, but let's work through it anyway.

So these two blocks of code have the same purpose, which is to provide feedback for the user at the end of a game.

So what I'd like to do is pause the video.

See if you can read through both blocks of texts and work out, what would the output be if the user scored seven? Okay, and what's the difference between the block of code labelled under number one and the block of code labelled under number Okay, so pause the video, work through the code to see if you can read it and trace through it using, imagine that the score variable is currently stored a seven, okay.

So pause the video, have a go at that.

And then unpause, when you think you've got some answers.

Okay, so how do you get on with that? So let's go through the first one.

So it says, if score is greater than 10, now we said score's a variable and the value being stored against score is seven, okay.

Now we've got an operator there, which is the greater than, okay.

So we're saying if the score is, or seven is greater than 10 or score is greater than 10, if that is true.

So we need to work out whether or not that statement is evaluated to true or false, okay.

Now, if the statement evaluates to true, it would say, set the text feedback label to great work.

So it would say great work.

If evaluated to false though, it would output hard luck.


So the question is, is does it evaluate to true or false? Okay, well, so we're essentially asking is seven greater than 10? Well, seven isn't greater than 10.

So that evaluates as false.

So if it evaluates as false, what's the output going to be? That's right, hopefully you said it's going to be hard luck.

Okay, so because the else is triggered therefore it's going to say hard luck.

So let's have a look at the second block of code.

So the first one are our conditions.

So if score is greater than 10.

So it's the same condition.

So if that evaluates to true then it's going to say great work.

Now, if it evaluates to true, it's a false, sorry.

We've got another condition that we need to evaluate.

So we've got this thing called else if here, okay.

So it says else if, so that's the same as saying otherwise really.

So otherwise, if score is greater than six, if that evaluates to true, then say not bad, but if it values to false, say hard luck.

Okay, so we've got two conditions there in the same selection block.

So we've gone from the first one having an if and just a single else.

And the second one has an if, then an else if and then an else, okay.

So the second one's slightly trickier, but let's go through it in order then.

So remember score is the same, seven or stored at a seven.

So if score is greater than 10, so is seven greater than 10? Again, that's evaluating to false.

So what's the output going to be? Is it going to say great work? No, it's not 'cause it would only say great work if it evaluated to true.

So then we ask the next question.

Else if score is greater than six.

So is seven greater than six? Well, it is greater than six, so that evaluates to true therefore the output will be, not bad.

Okay, 'cause the else won't be carried out.

Okay, so the else isn't always carried out.

It only carries out if that condition, initial condition, works out to be false, okay.

And the second one, because we've got an else if, we've got a true, so it looks at the true and if it's false it then asks a further question to be evaluated.

Okay, great.

Okay, so well done.

So let's move on.

What I'd like you to do now we've looked at selection is think wouldn't it be great if we could include selection in our app project, okay.

So I'd like you to just think, about this for a moment.

To think, where could you use selection inside your project? Is there were an opportunity at any point to get feedback, or is there other opportunities where we could use selection to break away from that sequence that's going to take place.


It might be somewhere around user input.


So let's move on with our project.

Now, if you remember the end of lesson four, what I said, is it's really important that you created or completed your Milestone 1 slide.

And the whole point of that was, you were talking to your future self about what you achieved last lesson, what you think you should be achieving in this lesson, okay.

So now you need to listen to your past self and look at what you said you were going to achieve, so you can make a plan.

So I'd like you to think big and work out what your plan is for this lesson, okay.

So I'd like you to, first of all, go ahead and open your project on code.

org that you started last lesson.

I'd also like to open up your project diary and look at that Milestone 1 slide.

And there, from that point onward, you should be able to read what you achieved last lesson and what you said, you're going to achieve this lesson, okay.

So try and come up with a plan of what you think you could achieve in this lesson.

Now it might help you to think that you probably, I would recommend around 40 minutes work on this in this lesson.

So when you're making that plan, think I've got about 40 minutes worth of time to work on this, okay.

So see if you've got a realistic, try and make a realistic plan of what you can achieve, okay.

So pause the video, open your app, open your project diary and have a look at your Milestone 1 document.

Right, okay.

So what I'd like to do now, you've done all of that.

You're now ready to get started with your app, okay.

Now you started last lesson.

So start again this lesson and continue developing it.

Now like I just said, you've got about 40 minutes, so let's see what you can achieve.

Let's see if you can start working on that code today, get some events in there.

Maybe put some variables in there, see if you can slot some selection.

But I suppose what's also really important is you look at your decomposed steps and work through those decomposed steps, okay.

Don't go into this with a big problem to solve, okay.

You've already broken this down into smaller steps.

So just work through those more manageable, achievable steps, okay.

So have fun with it most importantly.

So pause the video, work through it, have fun and then unpause, when you spent around 40 minutes on this project.

Okay, so you're joining me now because hopefully you've got further with your project and you've got to a nice point where you think you can stop for this lesson, okay.

So that's really well done.

And hopefully you've managed to achieve some code in there and you've put some events and maybe some selection, that would be really wonderful.

Now what I thought would be a great opportunity now is for us to gain some feedback.

Now I know you might be thinking, well, I haven't finished it yet so what's the point in getting feedback now? Well, absolutely, there's always points in getting feedback as often as you can, because it may well be that you've done some things that you think are really great but actually the people who are going to be using your app, maybe they don't think it's quite as great as you thought.

Or they might think of nice new features that you could add or things that you could do differently that would make it even better, okay.

So what I'd like you to do is think about, how are you going to measure whether or not the app has met the project brief? Well, hopefully you're thinking we've got our success criteria.

So that's my starting point.

So get the user to get whoever's giving you feedback to look through your success criteria and work out whether or not they think it's being met.

Now, if that's an opportunity for you to have somebody maybe where you are now to give you feedback, that would be great.

Anybody would do.

It could be your mom and dad, your brother, sister.

Anybody who thinks, who can look over your app and work through it and see whether or not, see what they think of it basically.

So to do this, your app needs to be open and ready to run.

So they don't need to see the code.

It's fine if they can see the code, but that's not what they're judging, they're judging the user experience, right? So I'd like to also have your project diary open and on the feedback slide.

On the feedback slide, the space for you to add your success criteria.

So make sure the table's completed with your success criteria and then simply ask anybody to come along and just have a go at your app, whatever state it's in and see if they can give you some really useful feedback, okay.

You might want to tell them that it's not finished and so they have that understanding and that's absolutely fine, but any opportunity for feedback is a really good thing.

So if you can do all that, pause the video, go and find somebody now to give you some feedback.

And then once you've got the feedback and they've noted down their thoughts unpause he video and we'll continue.

Okay, so hopefully you've got some feedback by now and you've been able to read over what they said.

Do you think it was useful? Hopefully they've given you something to think about that you might even want to plan for now that you can work on in lesson six, okay.

So on that note, I'd like you to do exactly what you did at the end of lesson four but this time go to Milestone 2.

So what you need to do is, you need to add a screenshot of your code or design window.

It doesn't need to be both, just one of them.

Write me down a few sentences about what you achieved in this lesson.

And again, most importantly, write a note to your future self about what you've got left to achieve in lesson six.

So lesson six is our last lesson in this unit.

So try and make a plan of realistically what you think you can complete by the end of one more lesson, okay.

So again, I would like you to pause the video now, head over to your project diary, find the Milestone 2 slide and fill that in and unpause once you've done that.

Okay, so that's all for lesson five.

And really, I imagine now your app is starting to take a really great shape and I'm really looking forward to seeing what you've achieved, okay.

So if you'd like to share your work, please ask your parents or carers to share your work on Instagram, Facebook, or Twitter, tagging @OakNational and using the #LearnwithOak.

I really can't wait to see these projects and hopefully have a go, have the opportunity to have a go myself, okay.

So I'm looking forward to seeing you in lesson six, where we'll finish off your projects and complete all this great work that you've been doing, okay.

So I'll see you then.