Skip main navigation

Computational thinking

Before you can use a computer to solve problems, you need to pick those problems apart and decide how to approach them.
silhouette of person thinking but their brain has been replaced by computer hardware, there are three questions marks in front of them.

Before you can use a computer to solve problems, you need to pick those problems apart and decide how to approach them. Computational thinking refers to the ideas and thinking skills used to design solutions to problems, or create systems so that a computer or computational agent can help.

The main areas of computational thinking listed in the Raspberry Pi Foundation framework are:

  • Logical reasoning
  • Decomposition
  • Designing algorithms
  • Identifying patterns and generalisation
  • Abstraction
  • Evaluation
  • Organising data

Logical reasoning

Logical reasoning is a high-level concept that feeds into all aspects of computational thinking. In order to solve a problem, you must be able to think things through logically.

An example of logical reasoning might be when you plan a long journey and need to decide when to leave. You will need to know the arrival time, traffic conditions, journey length, and average speed of the journey. You use logical reasoning to pick the best time to leave.


Decomposition is a skill used to break a large problem down into smaller, more manageable chunks. Imagine that you have been asked to design a game that asks the player to name a series of shapes. Using decomposition allows you to break this problem down into smaller sub-problems. You need to design the shapes, create the questions, check if the answers are correct, give feedback to the player, and store the scores. These are all steps that can be solved separately and then brought back together to form the solution.

Decomposition can go deeper than a single level. While working on part of the problem, you might feel that further decomposition is required. Always try to decompose a problem further it if feels too complex to solve.

Designing algorithms

Algorithms are precise sets of instructions that, when executed, lead to a problem being solved. The instructions should be clear, unambiguous, and easy to follow. This means that the algorithm should be so precise that it can be followed by a computer. They can be written for separate sub-problems, or for whole solutions.

Identifying patterns and generalisation

As you write more programs you will begin to develop a personal library of solutions to common problems. This library can be used for spotting patterns and generalisation.

When you start to notice that you are repeating yourself, you can decide to use a loop instead.

Scratch blocks for a square. "When green flag clicked" followed by 8 motion blocks, alternating between "move 10 steps" and "turn 90 degrees".


Scratch blocks for a square with a loop. "When green flag clicked", followed by a "repeat 4" block containing "move 10 steps" and "turn 90 degrees".

You may have already solved a problem in the past that is similar to your current one.

Here is some code to ask for a person’s name and give a response based on a condition.

Scratch blocks. "When this sprite clicked" followed by "ask "What's your name?" and wait", The next block is "if answer = "Ben" then", and this block contains "say "Hello Ben" for 2 seconds"

A similar structure can be used to ask a question in a quiz. Generalisation is when you realise that you can use the exact same pattern, for example each time you want to check for an input and react to it.

Scratch blocks. "When this sprite clicked" followed by "ask "How many sides does a square have?" and wait", The next block is "if answer = 4 then", and this block contains "say "Well done a square has 4 sides" for 2 seconds"


Abstraction means hiding unnecessary details. When finding solutions, you work at appropriate levels of detail. For example, there are many ways to represent a house.

three different epresentations of a house, the first is a simple outline, the second a more detailed drawing and the third is a photograph

You would use the one that reflects the required level of detail for your solution.

An example of abstraction in programming is when you use a subroutine. For example, a subroutine may have been created that draws a square; if we want to use this code, we simply call the square subroutine. We don’t need to know the code inside, just that it draws a square:

Scratch blocks. "define square" followed by a "repeat 4" block containing "move 10 steps" and "turn 90 degrees". Separately, "when green flag clicked" is followed by "square"

You can use this subroutine without knowing the detail of the steps inside it. The unnecessary detail has been hidden, therefore abstraction has occurred.


Evaluation is being able to look at your solution periodically and check whether it is working as intended. You should be analysing the success, efficiency, and effectiveness of solutions, comparing them to other solutions, and refining them accordingly.

Organising data

Being able to structure and organise data is an important skill. You should be able to decide what needs to be stored and how it should be stored, whether that is in a variable, list, array, or tuple.

Developing computational thinking

As you develop your computational thinking skills, you will become better at solving problems. Through practice, you start to notice when a problem needs decomposing, or you will generalise and remember other similar problems that you have solved in the past that might help. These skills can be explicitly taught to your learners and it is important to give them lots of examples of each skill, to help widen their definition of them.

Computational thinking in this course

As you learn new pedagogy in this course I will flag up where certain computational thinking skills might be developed.

Which skills have you used before? Which would you like to develop further? Let us know in the comments.

This article is from the free online

Programming Pedagogy in Secondary Schools: Inspiring Computing Teaching

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education