computational thinking
,Abstraction
Abstraction: The removal of unnecessary detail to simplify a complex
problem.
Need for abstraction:
Abstraction allows programmers to focus on core aspects of the problem and
therefore reduces programming time and complexity of the code.
It also reduces memory and processing requirements.
Difference between abstraction and reality:
Many visual elements such as trees & buildings may be removed or the quality
will be simplified as they are not relevant to the main program.
Instead it will focus on elements which are important / relevant to the program
,Thinking Ahead
Identify Inputs and Outputs:
An input can be any piece of data that an algorithm requires in order to run, usually
passed as a parameter to a subroutine.
An output can be any piece of data returned by the subroutine.
Preconditions for devising a solution:
Preconditions: Requirements that must be met before a program can run
When developing a program:
● Subroutines will need the correct data passed to them
● Input data / actions need to be validated to ensure the program works correctly
, Thinking Ahead: Caching
Caching: When frequently used data is stored so it can be accessed quickly if it's
needed again in the future.
Different parts of the problem can be stored in cache depending on the scenario.
It can speed up retrieval of data, which improves performance / reduces delays.
However, it relies on the same data being searched for, which is not always possible.