2.1 Computational thinking Flashcards
computational thinking
the thought processes involved in understanding problems and formulating solutions in a way that they can be carried out by computers
decomposition
reduces a problem into sub-problems or components, which are easier to understand and solve
Show how decomposition can be used to break down the problem of creating a snakes and ladders computer game
sub-problems:
- design of playing area
- positions of snakes and ladders
- dice throw for each player
- movement of each player on board
- movement up ladders and down snakes
- how does a player finish?
abstraction
identifying essential elements/relevant information and discarding inessential ones
Name an essential and inessential element of a snakes and ladders game
generating a random number between 1 and 6 for a dice throw
how far the dice is thrown
pattern recognition
sometimes called generalisation
used to:
-identify where constructs such as selection and iteration can be used
- identify where sections of code can be reused (functions and procedures)
- recognise a problem that is similar to one you have solved in the past
- reuse code, functions and procedures from past programs to carry out similar functions in a new program
algorithmic thinking
a subset of computational thinking that involves defining a clear set of instructions to solve a problem
once a successful solution has been found, it can be used repeatedly for the same problem
In a computer game ‘snakes and ladders’ there is a function named ‘dice throw’ which is called whenever it is a user’s turn.
Give a reason why this function is an abstractation [1]
it focuses on the essential purpose of throwing a dice and generating a number between 1 and 6
it ignores non-essential aspects like the colour of the dice
Describe what is meant by the following terms:
a) decomposition
b) algorithmic thinking [4]
a) decomposition involves breaking a problem down into smaller, more manageable parts, which are then easier to solve
b) algorithmic thinking is one aspect of computational thinking
it is the ability to formulate a clear set of instructions to solve a problem
advantages of decomposition
- makes complicated problems easier to solve
- individual parts of a problem allow multiple people to work on it at once
- components of a program can also be used in other programs