top of page
  • Writer's pictureNicky

What is computational thinking? And how do I effectively teach it?

Computational thinking is a popular term used in computer science. But what is it? And, more importantly, how do you teach it to your students?

what is computational thinking?

Well, you’re in the right place.

Let's look at how you can teach fantastic computers science lessons that will really engage your students.

Computational thinking is a skill used to apply different methods and reasoning in order to make sense of a complex problem. It allows people to understand a problem which allows them to develop a possible solution.

How does computational thinking work?

There are 4 main elements involved in computational thinking.

  • decomposition,

  • pattern recognition,

  • abstraction and

  • algorithms

When you're creating your computer science lesson plans, it is a good idea to make a clear distinction between each of these elements, to allow you and your students to focus on them individually. This can be done with using a variety of engaging and interactive teaching activities.

Don't try to rush each section. Take your time and don't try to do too much in one lesson.

Computational thinking is a set of skills which can be developed on their own or in parallel to learning coding.

Let’s look at each of these computational thinking skills one at a time.


This means breaking a problem down into smaller parts. Decomposition can help make a complicated problem more manageable. Let’s take, for example, a robot delivery service.

Level 1 problem: Deliver goods to customers by robot.

Level 1 tasks

There are many different things that a programmer who is developing a robot delivery system, needs to deal with:

  • Set up a system to allow customers to order the goods

  • Set up a system to allow customers to pay for the goods

  • Navigating to the customers' houses

  • Notifying a customer, the delivery has arrived

  • Navigating back to the packing area, to collect the next delivery

These could be considered the second level of tasks.

Level 2 tasks

Next, we can take one of those second level tasks and break it down even further.

For instance, “Set up a system to allow customers to order the goods” will need the following tasks

  • Show the customer the stock items available

  • Allow customer to add their desired items and quantity to their basket

  • Items which are out of stock, should not be added to the order

Level 3 tasks

Essentially what we have just been doing there is decomposing a task.

By breaking a large task into smaller and smaller tasks until each is manageable which can be worked on individually.

When programming, these tasks can be tested individually to make sure they work as they should.

Eventually the individual sections of the puzzle will need to be brought back together again and tested to make sure it all works and has created a complete solution.

How can I teach decomposition?

The best way to teach this skill is to ask students to break given problems into smaller tasks. They can do this individually, in pairs or even small teams depending on how complex the task is.

Students do not need to create the solutions for each of these tasks at this stage, but merely write few words to explain what the task is, as I have done above. They can present it as a bulleted list or in a tree diagram, as shown above.

Good everyday tasks you can ask them to decompose are:

  • Tidying their bedroom

  • Making a cup of tea

  • Describe how to move from one point to another in the school

  • Crossing the road

Pattern recognition

Lots of teachers think pattern recognition is just about spotting repetition. But, that isn’t the whole picture!

Pattern recognition is about spotting if there is a repeating pattern but also determining the sequence for instructions.

If a repeating pattern is spotted, it can help a programmer make more efficient programs. They can spot where loops are used and do not need to repeat code unnecessarily.

How can I teach pattern recognition?

You can ask your students to practice putting instructions into a logical order by giving them a jumbled set of instructions and asking them to put it into the best order. Sometimes there will be only one right way of doing this and other times there will be several possible answers. So, get students to compare their final lists with their classmates to spot where they are similar and where they are different.

An easy demonstration of the power of pattern recognition is to play a game of rock, paper, scissors with a volunteer from your class. Start the game as normal but you only ever play paper.

It won’t take your opponent long to spot this and will then work out how they can easily win by playing scissors each time. They will have spotted your pattern.

You can then ask for a second volunteer and again you only play paper but on every third go, you play rock. It will confuse them at first but keep to your pattern (paper, paper, rock, paper, paper, rock, paper, paper, rock etc.) and it won’t be long before they spot your new pattern.

This can lead to a discussion about how important spotting patterns is in making predictions. You can talk about how programmers need to predict how the program will be used, which will help them create a better program.

Another good example is to perform a dance with your class displaying the instructions in two ways.

First without a loop:

Dance routine without loop

Then showing them the same dance written as a loop:

Dance routine with loop

After you have recovered from the terrible dancing, ask your class which they found easier to follow.

It is the same dance but if we decide to change the dance, so they move right and then left each time, which set of instructions is easier to update?


Abstraction is when you take a step back from looking at the individual details that make a task unique and looking at the “big picture”. Students need to remove extra detail so they can focus on what is important. A popular example here is the London underground map.

London underground map

This uses straighter lines and simple colours to make a very complex map easier to understand. In reality it has very little bearing on where the tube stations actually are in relation to each other geographically. But the map does allow a traveller to know how the stations are linked together and which stations they need to pass through, to get to their destination.

In reality the map would look more like the following if it was laid out geographically.

Geographically correct London underground map

However, when you are travelling underground it doesn’t really matter how wiggly the route is, as long as you get to the station you are expecting.

The simpler map is much easier to read than the geographically correct version.

Students need to focus on answering the following questions when using abstraction:

  1. What are you trying to solve?

  2. Which details are important in solving this problem?

  3. What can you leave out? What information is unnecessary?

  4. Can you describe the problem as something more basic?

How can I teach abstraction?

You can use riddles and puzzles to great effect here. For instance, tell your students the following riddle:

Imagine you are the bus driver of the number 29 bus. At the first stop 12 passengers get on the bus. At the next stop 3 passengers get off but 4 others get on. One lady has a cat with her that she is taking to the vet’s. At the next stop the lady with the cat gets off the bus and 3 more passengers get on. What colour socks is the bus driver wearing?

Students would probably have started counting passengers or legs etc. And then final question about the socks will throw them.

However, after they have complained about how unfair you are and how ridiculous the question is, remind them of the first sentence “Imagine you are the bus driver...” and so the correct answer is whatever colour socks your student is wearing at the time. All the other information was not relevant.

Alternatively, you could ask a student to describe a film they have seen. You are not expecting a second by second account with a full cast list and detailed analysis of the scenery and lighting. You just want the most important information which is the main plot points and characters and possibly the student’s opinion on the film (if they loved it or hated it). That is abstraction.

Students can practice abstraction as a computational thinking skill getting facts out of passages of text you have given them. This does take a bit of preparation on your part but can be a really fun activity.

For instance, you could give them this statement to read through:

Well, I was walking down the road, not this road, you know the road next to the gym. My brother likes to go to that gym, he’s really into his keep fit, and watches what he eats too. He wants to be a personal trainer so it seems like he is always in the gym these days. Well, I was going down there the other night, I think it was Tuesday, or maybe it was Thursday. I know it wasn’t Wednesday because I was out with my mate, Emma and we went to the cinema to watch the new Spiderman film. It was really good, I love an action movie. Anyway, I was walking down the road, you know, next to the gym. And that’s when I saw it. It was just tied to the lamppost. It was so cold, it was trembling poor thing. I looked around but it looked nobody owned it. How could anybody leave an animal tied up like that, with no food or water? I untied it and it was so it excited it was wagging its tail all the way back to my house. And when we got home it was barking and running around in circles in excitement.

And then ask them the following questions:

  1. What did they find?

  2. How do you know what they found?

  3. How many siblings do they have?

The first two questions are quite easy. They found a dog and we know that because it was an animal that barks and wags its tail, which are two classic dog actions.

However, the final question is not so simple. Students may answer that they have one brother, which is true however we don’t know if that is their only sibling. So we can not assume they only have one sibling (a brother) and we would need to ask the witness further questions to find out more.


Algorithms are step by step instructions. These can be presented using plain language (often but not always in a list) or using diagrams or even pseudocode. Depending on the type of instructions it may be better to present them in one format over another.

For example, when building a Lego model, it is more useful to have pictures to describe the different stages rather than a description of what it should look like.

Alternatively explaining the rules of a board game is often done using written instructions to give the detail that is needed.

When giving directions a map is often helpful, along with written instructions.

Flow diagrams use particular symbols which it is important to show your students so they get used to them. Flow diagrams can be used to describe both real-world scenarios and programming concepts as shown below.

Flow diagram

How do I teach algorithms?

It is important to ask students to create algorithms using a variety of ways of presenting them. They need to get used to the flow diagram symbols along with the pseudocode and writing them as normal text.

Use everyday examples such as:

  • Writing a simple recipe

  • Explaining how to play a simple game or sport

  • Giving directions

  • Saying a nursery rhyme

When teaching programming I often include flow diagrams and pseudocode alongside the programming code so pupils can compare and see the logic of the program. You shouldn’t be afraid to include flow diagrams and pseudocode in your programming lessons, they complement it very well. Also, if students are stuck, I often get the student to draw the flow diagram or write the pseudocode to help them work out what they want their program to do.

There are different variants of pseudocode, depending on which exam board you are using so it is important to use the correct version to not disadvantage students in their exams.


Computational thinking is a set of skills which can help pupils, not only in computer science, but help them solve complex problems in other areas too. The 4 different skills we have looked at can be taught by using every day examples that the students are familiar with and then extending that into their coding. It sounds like a daunting subject but when you start teaching it, most teachers find it easier then they thought.

With a little planning you can create really enjoyable and engaging computational thinking lessons your students will love.

If you would like a computational thinking escape room activity to introduce the topic to your students, you can buy mine from TES or Teachers pay Teachers

Used today with a year 9 group - they really loved it ..and so did I!!

I played this today with years 7 & 8 and it was brilliant! The students all loved it. There was great competition in the class to finish first. Great resource. Thank you!

Really impressive, nice way to introduce some computing concepts.

Alternatively, I have just released my computational worksheets which you can also buy from TES or Teachers pay Teachers.

The bundle contains 12 ready to use computational thinking worksheets you can immediately use with your class, with absolutely no preparation necessary.

You even have a separate copy of each handout that contains the answers, making these a brilliant easy to use addition to your toolkit to help you when writing your computer science lesson plans .

Computational Thinking Lesson Worksheets


Featured Posts
Recent Posts
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
  • Pinterest Social Icon
bottom of page