Loading...
Hello, my name is Mrs. Holborow and welcome to Computing.
I'm so pleased that you've decided to join me for the lesson today.
Today, we are going to use our knowledge of computational thinking to tackle a project.
Welcome to today's lesson from the Unit Algorithmic Thinking.
This lesson is called Tackling a Project using Computational Thinking.
And by the end of today's lesson, you'll be able to use computational thinking to understand the needs of a project and design an algorithm to solve a problem.
Shall we make a start? We will be exploring these keywords throughout today's lesson.
Analyse.
Analyse.
To take something apart, look closely at its pieces, and then put the information back together in a way that makes sense.
Design.
Design to plan or create something.
Look out for these keywords throughout today's lesson.
Today's lesson is broken down into two parts.
We'll start by analysing a problem with computational thinking and then we'll design an algorithm.
Let's make a start by analysing a problem with computational thinking.
Think about the term computational thinking.
What does it mean to you? Maybe pause the video whilst you have a think.
Ah, Aisha says, "To me, computational thinking is about thinking how to solve problems effectively.
Like analysing how something can be solved." That's a great response, Aisha.
Well done.
Sam says, "To me, computational thinking is a structured and logical way of thinking that helps you tackle challenges in all sorts of areas, not just computers." That's another great response.
Well done, Sam.
Were these similar to your responses? Starting out on a new project can be exciting, but it also can be a bit difficult.
When you begin working on a new project, the exact details of the problem and the project's needs may not be clear.
It can be tempting to jump straight into developing a solution for a project.
But before trying to solve the problem, it's wise to first think carefully about how and analyse the problem to make sure it's fully understood.
Understanding the problem well is key to making sure that your solution actually works and works efficiently.
There are many ways to analyse a problem and there is no single best way.
One way is to use the Three W's technique.
The Three W's technique is used to develop an understanding of the problem by answering a few questions.
What does the solution need to do? Why does this problem need to be solved? And who will be using the solution you are creating? Consider the following potential project scenarios.
Aisha's project idea is to create a simple app that will help users track and complete their homework.
Sam's project idea is to create an app that will take a lunch order and calculate the price of a meal.
Let's answer the Three W's question for Aisha's project idea.
What does the solution need to do? "My app needs to allow students to add and track their homework assignments, deadlines, and notes in one place." Why does this problem need to be solved? "The app is needed so that students can better plan for and complete their homework.
It will help them to be more organised and manage their time." Who will use the solution you are creating? "The homework app is for Year 11 GCSE students, so it needs to be easy to use on their phones and helpful for managing GCSE coursework." After a problem is well understood, computational thinking can be used to help develop a solution.
Many different computational thinking techniques can be used to solve problems, but three useful techniques are, decomposition, breaking a problem down.
Obstruction, only focusing on the important details.
And algorithmic thinking, creating a step-by-step solution.
Let's see how Aisha can use computational thinking skills with her project idea.
Decomposition.
"I will break the whole problem down into three smaller problems. Students need to be able to add homework, view the list of homework tasks, and tick the homework off once done." Abstraction.
"I will only focus on the most important details for each of the smaller sub problems. For example, when adding homework, students should be able to add the subject like maths or English.
Describe what the homework task is and add a date for when it's due.
I won't worry about colours or fonts used in the app just yet." Time to check your understanding.
True or false? A problem should be understood before using computational thinking.
Pause the video and have a think.
That's right, it's true.
You really need to understand your problem before you can start applying computational thinking techniques.
Abstraction is about A, creating a step-by-step plan.
B, breaking a problem down into smaller pieces.
Or C, focusing on the things that matter the most in the problem.
Pause the video whilst you have a think.
Did you get that right? I'm sure you did.
Abstraction is about focusing on the things that matter most in the problem.
Okay, we are moving on to our first lesson task of today's lesson and you're doing a fantastic job so far.
So well done.
Sam's project idea is to develop an app that will take a lunch order and calculate the price of the meal.
For part one, use the Three W's technique to develop your understanding of Sam's problem.
Remember, that's what does the solution need to do? Why does the problem need to be solved? And who is going to use the solution.
For part two, use decomposition to break Sam's problem down into smaller, more manageable pieces.
And then for part three, use abstraction to ensure you focus on the important details which matter.
Note, there is no need to write an algorithm at this point.
You're going to use your work from this activity to help you write an algorithm in Task B.
You're also free to make assumptions about the app as needed.
Pause the video whilst you have a go at the activity.
How did you get on? I'm sure you managed to complete the activity.
Let's have a look at these sample answers together.
For part one, you were asked to use the Three W's technique to develop your understanding of Sam's problem.
So firstly, what does the solution need to do? "I've assumed that the app is for a lunchtime sandwich bar.
The app needs to take the order, calculate the total cost, and then let the user know how much the food costs." Why does this problem need to be solved? "The app will help the lunchtime queue move faster as it will be quicker to place an order and pay using the system.
This will help students to get their lunch quicker and reduce the size of the lunch queue." Who will use the solution you are creating? "The app will be used in school and could be used by all students from year seven to year 11." For part two, you were asked to use decomposition to break Sam's problem down into more manageable pieces.
"To help make the solution manageable, I would decompose the problem down into getting use input, processing the input, so some decision making, and giving an output price back to the user." Did you decompose the problem in a similar way? Finally, for part three you asked to use abstraction to ensure you focus on the most important details that matter.
Here's a sample answer.
"For the user input, I think the app should print a welcome message with the prices of food and then take the user's input for the order.
To process the input, I think the algorithm should check the user's input and then calculate the cost based on what food the user has ordered.
For the output, I think the algorithm should print out the total cost so the student knows how much to pay.
I've ignored less important things such as which colours, fonts, and sounds might be used in the app.
I have instead focused on the important details that matter to get the app working." Okay, we are moving on to the second part of today's lesson and you've done a fantastic job so far, so well done.
We are now going to design an algorithm.
Algorithm design is about creating a clear, step-by-step plan or set of instructions to solve a problem.
It's like writing a detailed set of instructions for someone or a computer to follow.
In computer science, algorithms can be represented in a number of ways such as, written descriptions, flowcharts, and pseudocode.
The designer of the algorithm can choose whichever method they feel is most suited to the problem.
A flowchart is a diagram used to illustrate the steps of an algorithm.
Here's an example.
Flowcharts are made up of symbols, each containing a single step of the algorithm.
Flowcharts can be helpful to introduce the outline of an algorithm structure and flow control.
Pseudocode is a way of expressing the logical steps of an algorithm using syntax that is independent of any particular programming language.
Here's some examples syntax.
Which is checking if the hour is less than 12.
And then displaying Good morning if it is, or Good afternoon if it isn't.
Notice this isn't any particular programming language, this is pseudocode.
Pseudocode can be helpful because it's closer to the final code and can better outline more complex algorithms. A written description is when plain language is used to explain how an algorithm works.
An example may be, if the hour is less than 12, then the message Good morning should be displayed on the screen.
If the hour is more than 12, then the display on the screen should read Good afternoon.
Notice how different this is from the pseudocode example we've just seen.
A written description is like telling someone how to do something step by step in simple language.
Aisha has a question.
"I wonder if I should use all three methods of written descriptions, pseudocode and flowcharts when designing an algorithm." What do you think? Maybe pause the video whilst you think about Aisha's question.
Sam says, "I'm not so sure, Aisha, maybe using all three methods might take too much time and is unnecessary?" Sam's right.
There's no need to use multiple methods to design an algorithm, but you are free to do so if you wish.
A programmer should choose whatever method they feel is most suited to the problem or section of the algorithm.
Aisha says, "I'm going to use a flowchart to outline the logic of my algorithm.
I think I will also use some pseudocode to represent a bit of the code because it'll be closer to the final code I will use in Python." That's a good decision.
Aisha.
Ah so Aisha started her flowchart here.
The first part of my flowchart will welcome the user, show the main menu choices and take a choice from the user.
So you can see we have start, output welcome message, output main menu, input choice.
Aisha's also written some pseudocode.
"I've written some pseudocode for the welcome message and main menu option for the app algorithm.
This will help when I need to programme the final code in Python." So you can see here the pseudocode that prints the welcome message and prints the main menu items. So the user is told to press one, to add homework, press two, to view homework, or press three, to delete a homework.
Notice Aisha has also added in some comments to explain the pseudocode.
This will help when Aisha starts creating the final code in Python.
Ah, Aisha's developed her flowchart a bit more now.
She says, "The next part of the flowchart will ask the user to input the homework and due date.
It will then return to the main menu so the user can make their next choice." So you can see here we've got a decision that says, choice is equal to one, if that's true, it's going to end to homework, and then the user can input their homework.
It will then ask the user to enter the due date.
The user can enter their due date and then it will output a thank you message before going back to the main menu.
Aisha's then developed the flowchart a bit further.
She says, "I will then continue my flowchart to show the logic if the user chooses option two or three." Time to check your understanding.
True or false.
A written description, flowchart and pseudocode should be all used to represent an algorithm.
Pause the video whilst you have a think.
Did you select false? Well done.
The designer of the algorithm can choose whichever method or combination of methods they feel is most suited to the problem.
You don't always have to use all three.
Which representation of an algorithm is closest to real code such as Python? Is it A, a written description.
B, pseudocode.
Or C, a flowchart.
Pause the video whilst you have a think.
That's right.
Pseudocode is the closest representation of an algorithm to real code such as Python.
Well done.
Okay, we are now moving on to our final set of tasks for today's lesson.
Sam says, "My project idea is to create an app that will take a lunch order and calculate the price of the meal.
The sandwich bar only sells sandwiches and wraps." For part one, design an algorithm that will solve Sam's problem of creating an app for the sandwich bar.
Note, you can use your answers from Tasks A parts one, two, and three to help you plan out the logical steps to solve the problem.
It is recommended to use the flowchart to represent the algorithm, but you may choose whichever techniques you prefer.
How did you get on? Did you manage to create your designs? Great work.
You were asked to design an algorithm that will solve Sam's problem of creating an app for the sandwich bar.
Here's just a sample answer.
Remember, your flowchart or algorithm design may look different from this.
So we have start.
We have output, a welcome message.
Output the prices of the food.
And then we allow the user to input their choice of food.
We have a decision which says, "IF the choice is equal to a sandwich, then calculate the cost and output the total cost of food.
If it's false, then it's going to be a wrap.
So it's going to calculate a different cost and it's going to output that cost to the user and then end." Here's a different design using pseudocode this time.
So again, we have the welcome message and then we are displaying the food prices to the user.
So we've got the price for the sandwich and the price for the wrap.
Okay, we've come to the end of today's lesson and you've done a fantastic job, so well done.
Let's summarise what we've learned together.
Understanding a problem well is key to making sure algorithm solutions work efficiently.
The Three W's technique can be used to help develop understanding of problems by answering a few questions.
Computational thinking can be used to help develop a solution.
Algorithms can be presented using whatever method is most suited to the problem.
I hope you've enjoyed today's lesson and I hope you'll join me again soon.
Bye.