2.1 Algorithms Flashcards
Principles of Computational Thinking
- Abstraction
- Decomposition
- Algorithmic thinking
Abstraction
The process of removing all unnecessary details and including only the most relevant details.
Decomposition
Breaking down a complex problem into smaller, more manageable parts.
Algorithmic thinking
A way of getting to a solution by identifying the individual steps needed.
Inputs
Anything that needs to be supplied to the program to meet its goals.
Processes
Which calculations must be performed while the program is running.
Outputs
What your program needs to output.
Types of Errors
- Syntax errors
- Logic errors
Syntax Errors
Errors that break the grammatical rules of a programming language and stop it from running.
Logic Errors
Errors that produce an unexpected output, however the program still runs.
Structure Diagrams
Help to illustrate problem decomposition. They use ‘Step Wise Refinement’
Each node should achieve a single task which can then be coded as a subprogram
Trace Tables
Take each line at a time and write out the state of each variable.
Flow Charts
A method of representing the sequence of steps in an algorithm in the form of a diagram.
→
Represents flow from one component to the next.
▭
Process
E.g. Input