You are on page 1of 6

COMPUTATIONAL THINKING

PROGRAMMING LANGUAGE
COMPUTATIONAL THINKING
 Computational thinking is a set of problem-solving methods that involve expressing problems and their solutions
in ways that a computer could execute
 Thinking is an internal mental process that uses information as input and integrates the information with
previous learned material resulting in new knowledge.
 Computational thinking is yet another way of thinking which combines the previous-mentioned ways of
thinking. It allows us to take a complex problem, understand what the problem is and develop possible solutions.
We can then present these solutions in a way that a computer, a human, or both, can understand.

There are four key techniques to computational thinking:


Decomposition – breaking down a complex problem or system into smaller, more manageable parts
Pattern recognition – looking for similarities among and within problems !
Abstraction– focusing on the important information only, ignoring irrelevant detail
Algorithms – developing a step-by-step solution to the problem, or the rules to follow to solve the problem
Decomposition and abstraction
Abstraction
This involves taking a real-life situation and creating a model of it so that it can be analyzed.
Using a model with symbols, we can identify the important aspects of the problem and ignore the unnecessary detail.
Examples of abstraction:
• variables in a program represent real values
• functions in a program to represent a group of actions that produce a result
• maps are a representation of part of the Earth’s surface.
Decomposition
Decomposition means breaking the complex problem down into smaller parts.
• Dealing with each small part of the problem is much simpler than trying to deal with the complex problem.
• Breaking the problem down into several sub-problems allows us to work on each of these individually and then
combine them into a solution to the complex problem.
• For very large problems, a team of programmers can work on individual parts of the problem to achieve a solution
For example, imagine a programmer wishes to create a system to sell T-shirts. This could be a
relatively large problem. Where would they start? By using decomposition and abstraction, the
programmer can begin to work out how to tackle the problem.
Explain simple algorithms in terms of their inputs, processing and outputs
An algorithm can be represented by the diagram below

Input refers to data that is given to the algorithm by the user. This may be typed in via the
keyboard, entered with another input device such as a microphone or read in from an external data
file.
Output is the data that is given back to the user by the algorithm. This may be done with a message
on the screen, using another output device such as a printer or by writing to an external data file.
Processing describes the steps that the algorithm takes in order to solve the problem. This stage
involves processing the given input in order to produce the desired output
Example of Input–Process–Output

Going back to the example of the system to sell T-shirts, what are the inputs, outputs and processes for the
section of the system that allows the user to search for suitable T-shirts? The inputs include everything
that the system requires the user to enter: for example, the size, colour and style of T-shirt that they
require. Another input would be an external file containing details of all the T-shirts available. With these
inputs, the system will then carry out processes to find T-shirts to match the user’s search criteria, such as
only selecting those in the correct size and colour and excluding any that are out of stock. Once this has
been completed, a list of matching T-shirts will be produced as an output to the user

INPUT PROCESS
Size of T-shirt required Search through list Find OUTPUT
Colour of T-shirt matching T-shirts List of T-shirts that meet
required File of all T- Exclude T-shirts out of customer requirements
shirts available stock

You might also like